Apply Clippy lints

This commit is contained in:
mo8it
2025-08-22 00:01:23 +02:00
parent 295ad2e4bd
commit 6ec2e194ae
3 changed files with 23 additions and 24 deletions
+4 -4
View File
@@ -20,10 +20,10 @@ struct ExerciseFiles {
}
fn create_dir_if_not_exists(path: &str) -> Result<()> {
if let Err(e) = create_dir(path) {
if e.kind() != io::ErrorKind::AlreadyExists {
return Err(Error::from(e).context(format!("Failed to create the directory {path}")));
}
if let Err(e) = create_dir(path)
&& e.kind() != io::ErrorKind::AlreadyExists
{
return Err(Error::from(e).context(format!("Failed to create the directory {path}")));
}
Ok(())