Skip to content

Commit

Permalink
Clippy recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar committed Nov 16, 2024
1 parent 9e1fc83 commit b714154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/libs/bindgen/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl Signature {
}

// Then we see if we can infer retval-like behavior more conservatively.
self.params.last().map_or(false, |param| param.is_retval())
self.params.last().is_some_and(|param| param.is_retval())
&& self.params[..self.params.len() - 1].iter().all(|param| {
let flags = param.def.flags();
!flags.contains(ParamAttributes::Out)
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/windows/direct3d12/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ extern "system" fn wndproc<S: DXSample>(
_ => {
let user_data = unsafe { GetWindowLongPtrA(window, GWLP_USERDATA) };
let sample = std::ptr::NonNull::<S>::new(user_data as _);
let handled = sample.map_or(false, |mut s| {
let handled = sample.is_some_and(|mut s| {
sample_wndproc(unsafe { s.as_mut() }, message, wparam)
});

Expand Down

0 comments on commit b714154

Please sign in to comment.