Skip to content

Commit 96cfa5f

Browse files
committed
clippy
1 parent 0ca3921 commit 96cfa5f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/tools/miri/miri-script/src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ impl Command {
423423
.map(|path| path.into_os_string().into_string().unwrap())
424424
.collect()
425425
} else {
426-
benches.into_iter().map(Into::into).collect()
426+
benches.into_iter().collect()
427427
};
428428
let target_flag = if let Some(target) = target {
429429
let mut flag = OsString::from("--target=");

src/tools/miri/src/concurrency/cpu_affinity.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ impl CpuAffinityMask {
5454
let chunk = self.0[start..].first_chunk_mut::<4>().unwrap();
5555
let offset = cpu % 32;
5656
*chunk = match target.options.endian {
57-
Endian::Little => (u32::from_le_bytes(*chunk) | 1 << offset).to_le_bytes(),
58-
Endian::Big => (u32::from_be_bytes(*chunk) | 1 << offset).to_be_bytes(),
57+
Endian::Little => (u32::from_le_bytes(*chunk) | (1 << offset)).to_le_bytes(),
58+
Endian::Big => (u32::from_be_bytes(*chunk) | (1 << offset)).to_be_bytes(),
5959
};
6060
}
6161
8 => {
6262
let start = cpu / 64 * 8; // first byte of the correct u64
6363
let chunk = self.0[start..].first_chunk_mut::<8>().unwrap();
6464
let offset = cpu % 64;
6565
*chunk = match target.options.endian {
66-
Endian::Little => (u64::from_le_bytes(*chunk) | 1 << offset).to_le_bytes(),
67-
Endian::Big => (u64::from_be_bytes(*chunk) | 1 << offset).to_be_bytes(),
66+
Endian::Little => (u64::from_le_bytes(*chunk) | (1 << offset)).to_le_bytes(),
67+
Endian::Big => (u64::from_be_bytes(*chunk) | (1 << offset)).to_be_bytes(),
6868
};
6969
}
7070
other => bug!("chunk size not supported: {other}"),

src/tools/miri/src/shims/windows/handle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Handle {
9797

9898
// packs the data into the lower `data_size` bits
9999
// and packs the discriminant right above the data
100-
discriminant << data_size | data
100+
(discriminant << data_size) | data
101101
}
102102

103103
fn new(discriminant: u32, data: u32) -> Option<Self> {

0 commit comments

Comments
 (0)