clippy fixes

This commit is contained in:
nora 2022-12-19 11:08:56 +01:00
parent 0e1dba694d
commit 0568135f3d
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View file

@ -45,7 +45,7 @@ fn dont_move() {
#[test]
fn ptr_correct_addr() {
static STATIC: u8 = 0;
let addr = std::format!("{:p}", (&STATIC) as *const u8);
let addr = std::format!("{:p}", std::ptr::addr_of!(STATIC));
let fmt = format!("{:p}", &STATIC);
assert_eq!(addr, fmt);