Skip to content

Commit

Permalink
Fixes clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomaz-Vieira committed Oct 8, 2023
1 parent e452039 commit cb22054
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/rw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ mod error {

{
use std::error::Error;
assert!(matches!(err.source(), None));
assert!(err.source().is_none());
}

assert_eq!(
Expand Down Expand Up @@ -403,7 +403,7 @@ mod enlarge_error {
let err = EnlargeError::from(try_reserve_error);

use std::error::Error;
assert!(matches!(err.source(), None));
assert!(err.source().is_none());

assert_eq!(format!("{}", err.clone()), "could not enlarge buffer");

Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ mod byte_vec_ext {
fn try_extend_zeroed_err() {
let mut vec = vec![0; 12];

assert!(matches!(vec.try_extend_zeroed(usize::MAX), Err(_)));
assert!(vec.try_extend_zeroed(usize::MAX).is_err());
}
}

Expand Down

0 comments on commit cb22054

Please sign in to comment.