mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-26 04:41:31 +00:00
clippy
This commit is contained in:
parent
68c6e5d7bf
commit
6884dd295a
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ use std::{env::current_dir, process::Command};
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[clippy::allow(unwrap_used)]
|
#[allow(clippy::unwrap_used)]
|
||||||
fn test_errors_used() {
|
fn test_errors_used() {
|
||||||
let mut unused_error_found = false;
|
let mut unused_error_found = false;
|
||||||
let mut current_dir = current_dir().unwrap();
|
let mut current_dir = current_dir().unwrap();
|
||||||
|
@ -31,7 +31,7 @@ fn test_errors_used() {
|
||||||
let output = grep_apub.output().unwrap();
|
let output = grep_apub.output().unwrap();
|
||||||
let grep_apub_out = std::str::from_utf8(&output.stdout).unwrap();
|
let grep_apub_out = std::str::from_utf8(&output.stdout).unwrap();
|
||||||
|
|
||||||
if grep_all_out.len() == 0 {
|
if grep_all_out.is_empty() {
|
||||||
println!("LemmyErrorType::{} is unused", error);
|
println!("LemmyErrorType::{} is unused", error);
|
||||||
unused_error_found = true;
|
unused_error_found = true;
|
||||||
}
|
}
|
||||||
|
@ -40,5 +40,5 @@ fn test_errors_used() {
|
||||||
unused_error_found = true;
|
unused_error_found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert!(unused_error_found == false);
|
assert!(!unused_error_found);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue