Skip to content

Commit

Permalink
Pacify clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
grembo committed Sep 4, 2023
1 parent 8cade2e commit c2fb5d2
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/compiler/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,40 +254,38 @@ mod test {

#[test]
fn test_is_minversion() {
assert_eq!(
assert!(
Clang {
clangplusplus: false,
is_appleclang: false,
version: Some("\"Ubuntu Clang 14.0.0\"".to_string()),
}
.is_minversion(14),
true
.is_minversion(14)
);
assert_eq!(
Clang {
assert!(
!Clang {
clangplusplus: false,
is_appleclang: false,
version: Some("\"Ubuntu Clang 13.0.0\"".to_string()),
}
.is_minversion(14),
false
.is_minversion(14)
);
assert_eq!(Clang {
assert!(Clang {
clangplusplus: false,
is_appleclang: false,
version: Some("\"FreeBSD Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)\"".to_string()),
}.is_minversion(14), true);
assert_eq!(Clang {
}.is_minversion(14));
assert!(!Clang {
clangplusplus: false,
is_appleclang: false,
version: Some("\"FreeBSD Clang 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)\"".to_string()),
}.is_minversion(14), false);
}.is_minversion(14));

assert_eq!(Clang {
assert!(!Clang {
clangplusplus: false,
is_appleclang: true,
version: Some("\"FreeBSD Clang 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)\"".to_string()),
}.is_minversion(14), false); // is_appleclang wins
}.is_minversion(14)); // is_appleclang wins
}

#[test]
Expand Down

0 comments on commit c2fb5d2

Please sign in to comment.