File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ use crate::env;
9393use crate :: ffi:: c_void;
9494use crate :: fmt;
9595use crate :: panic:: UnwindSafe ;
96- use crate :: sync:: atomic:: { AtomicUsize , Ordering :: Relaxed } ;
96+ use crate :: sync:: atomic:: { AtomicU8 , Ordering :: Relaxed } ;
9797use crate :: sync:: LazyLock ;
9898use crate :: sys_common:: backtrace:: { lock, output_filename, set_image_base} ;
9999use crate :: vec:: Vec ;
@@ -255,7 +255,7 @@ impl Backtrace {
255255 // Cache the result of reading the environment variables to make
256256 // backtrace captures speedy, because otherwise reading environment
257257 // variables every time can be somewhat slow.
258- static ENABLED : AtomicUsize = AtomicUsize :: new ( 0 ) ;
258+ static ENABLED : AtomicU8 = AtomicU8 :: new ( 0 ) ;
259259 match ENABLED . load ( Relaxed ) {
260260 0 => { }
261261 1 => return false ,
@@ -268,7 +268,7 @@ impl Backtrace {
268268 Err ( _) => false ,
269269 } ,
270270 } ;
271- ENABLED . store ( enabled as usize + 1 , Relaxed ) ;
271+ ENABLED . store ( enabled as u8 + 1 , Relaxed ) ;
272272 enabled
273273 }
274274
You can’t perform that action at this time.
0 commit comments