Skip to content

Commit b808cbe

Browse files
Use less sussy cast
1 parent dcd0aaa commit b808cbe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/skip_inner_frames.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use backtrace::Backtrace;
2+
use core::ffi::c_void;
23

34
// This test only works on platforms which have a working `symbol_address`
45
// function for frames which reports the starting address of a symbol. As a
@@ -22,9 +23,9 @@ fn backtrace_new_unresolved_should_start_with_call_site_trace() {
2223

2324
assert!(!b.frames().is_empty());
2425

25-
let this_ip = backtrace_new_unresolved_should_start_with_call_site_trace as usize;
26-
println!("this_ip: {:?}", this_ip as *const usize);
27-
let frame_ip = b.frames().first().unwrap().symbol_address() as usize;
26+
let this_ip = backtrace_new_unresolved_should_start_with_call_site_trace as *mut c_void;
27+
println!("this_ip: {:p}", this_ip);
28+
let frame_ip = b.frames().first().unwrap().symbol_address();
2829
assert_eq!(this_ip, frame_ip);
2930
}
3031

0 commit comments

Comments
 (0)