Skip to content

Commit

Permalink
fix single-match clippy warning
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Apr 12, 2024
1 parent 67796a7 commit d1522be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ impl<'a> Note<'a> {

impl<'a> Drop for Note<'a> {
fn drop(&mut self) {
match self {
Note::Owned { ptr, .. } => unsafe { libc::free((*ptr) as *mut libc::c_void) },
_ => (),
if let Note::Owned { ptr, .. } = self {
unsafe { libc::free((*ptr) as *mut libc::c_void) }
}
}
}
Expand Down

0 comments on commit d1522be

Please sign in to comment.