summaryrefslogtreecommitdiff
path: root/ext/ffi/repr.rs
diff options
context:
space:
mode:
authorlinbingquan <695601626@qq.com>2022-12-18 06:20:15 +0800
committerGitHub <noreply@github.com>2022-12-17 23:20:15 +0100
commitf46df3e35940fc78163945eed33e58fafed0b06b (patch)
treec22233bf2019a254045ad0af533225d3f02a402f /ext/ffi/repr.rs
parentf2c9cc500c84a3c6051823cd3ae33d6b4c1f6266 (diff)
chore: update to Rust 1.66.0 (#17078)
Diffstat (limited to 'ext/ffi/repr.rs')
-rw-r--r--ext/ffi/repr.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/ext/ffi/repr.rs b/ext/ffi/repr.rs
index 22cf03a6b..20b98154c 100644
--- a/ext/ffi/repr.rs
+++ b/ext/ffi/repr.rs
@@ -301,9 +301,7 @@ where
}
// SAFETY: ptr and offset are user provided.
- Ok(unsafe {
- ptr::read_unaligned::<u32>(ptr.add(offset) as *const u32) as u32
- })
+ Ok(unsafe { ptr::read_unaligned::<u32>(ptr.add(offset) as *const u32) })
}
#[op(fast)]
@@ -327,9 +325,7 @@ where
}
// SAFETY: ptr and offset are user provided.
- Ok(unsafe {
- ptr::read_unaligned::<i32>(ptr.add(offset) as *const i32) as i32
- })
+ Ok(unsafe { ptr::read_unaligned::<i32>(ptr.add(offset) as *const i32) })
}
#[op]