This commit is contained in:
Ralf Jung 2024-12-27 09:44:52 +01:00
parent 0ca3921747
commit 96cfa5f2fd
3 changed files with 6 additions and 6 deletions

View file

@ -423,7 +423,7 @@ impl Command {
.map(|path| path.into_os_string().into_string().unwrap())
.collect()
} else {
benches.into_iter().map(Into::into).collect()
benches.into_iter().collect()
};
let target_flag = if let Some(target) = target {
let mut flag = OsString::from("--target=");

View file

@ -54,8 +54,8 @@ impl CpuAffinityMask {
let chunk = self.0[start..].first_chunk_mut::<4>().unwrap();
let offset = cpu % 32;
*chunk = match target.options.endian {
Endian::Little => (u32::from_le_bytes(*chunk) | 1 << offset).to_le_bytes(),
Endian::Big => (u32::from_be_bytes(*chunk) | 1 << offset).to_be_bytes(),
Endian::Little => (u32::from_le_bytes(*chunk) | (1 << offset)).to_le_bytes(),
Endian::Big => (u32::from_be_bytes(*chunk) | (1 << offset)).to_be_bytes(),
};
}
8 => {
@ -63,8 +63,8 @@ impl CpuAffinityMask {
let chunk = self.0[start..].first_chunk_mut::<8>().unwrap();
let offset = cpu % 64;
*chunk = match target.options.endian {
Endian::Little => (u64::from_le_bytes(*chunk) | 1 << offset).to_le_bytes(),
Endian::Big => (u64::from_be_bytes(*chunk) | 1 << offset).to_be_bytes(),
Endian::Little => (u64::from_le_bytes(*chunk) | (1 << offset)).to_le_bytes(),
Endian::Big => (u64::from_be_bytes(*chunk) | (1 << offset)).to_be_bytes(),
};
}
other => bug!("chunk size not supported: {other}"),

View file

@ -97,7 +97,7 @@ impl Handle {
// packs the data into the lower `data_size` bits
// and packs the discriminant right above the data
discriminant << data_size | data
(discriminant << data_size) | data
}
fn new(discriminant: u32, data: u32) -> Option<Self> {