1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-12-10 11:10:26 +02:00

Merge pull request #644 from apogeeoak/clippy

Updated source to follow clippy suggestions.
This commit is contained in:
marisa 2021-02-10 10:37:13 +01:00 committed by GitHub
commit ab57c26cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ fn main() {
let fname = format!("{}", e.path.display());
let filter_cond = filters
.split(',')
.filter(|f| f.trim().len() > 0)
.filter(|f| !f.trim().is_empty())
.any(|f| e.name.contains(&f) || fname.contains(&f));
let status = if e.looks_done() { "Done" } else { "Pending" };
let solve_cond = {

View File

@ -131,7 +131,7 @@ fn all_exercises_require_confirmation() {
file.read_to_string(&mut s).unwrap();
s
};
source.matches("// I AM NOT DONE").next().expect(&format!(
source.matches("// I AM NOT DONE").next().unwrap_or_else(|| panic!(
"There should be an `I AM NOT DONE` annotation in {:?}",
path
));