Skip to content

base_convert: MSRV-1.80): let as_slice = buf.as_flattened_mut(); #504

@github-actions

Description

@github-actions

On 2025-07-21 @prestwich wrote in 2973b98 “Merge pull request #490 from DaniPopes/no-alloc-fmt”:

MSRV-1.80): let as_slice = buf.as_flattened_mut();

    fn new(limbs: [u64; LIMBS], mut base: u64) -> Self {
        // We need to do this so we can guarantee that `buf` is big enough.
        base = crate::utils::max_pow_u64(base);

        let mut buf = [[MaybeUninit::uninit(); 2]; LIMBS];
        // TODO(MSRV-1.80): let as_slice = buf.as_flattened_mut();
        let as_slice = unsafe {
            core::slice::from_raw_parts_mut(buf.as_mut_ptr().cast::<MaybeUninit<u64>>(), LIMBS * 2)
        };
        let mut init = 0;
        for (i, limb) in SpigotLittle::new(limbs, base).enumerate() {

From src/base_convert.rs:395

Metadata

Metadata

Assignees

Labels

to doTo be donetrackerIssue tracked by bot

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions