You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[allow(clippy::string_lit_as_bytes)]// A u8 slice is required here
"rust"
.as_bytes()
.try_into()
.expect("tag string.as_bytes() should be able to convert into [u8; 4]"),
);
}
Is there a reason this uses lazy_static instead of just a const and a byte string literal (of type &[u8;4])? u32::from_ne_bytes is const stable since 1.44.
In general on on use of lazy_static!. Something that I doubt is considered by the lazy_static crate, or the standard Rust libraries in general, is interrupts that end up preempting code execution. An example of this is APC delivery preempting some region of code that expects not to be interrupted.
windows-drivers-rs/crates/wdk-alloc/src/lib.rs
Lines 25 to 33 in 79d09bb
Is there a reason this uses lazy_static instead of just a const and a byte string literal (of type
&[u8;4]
)?u32::from_ne_bytes
is const stable since 1.44.C.f. https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2be24215859c818308542b6893f36ca2
The text was updated successfully, but these errors were encountered: