summaryrefslogtreecommitdiff
path: root/src/embedded.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/embedded.rs')
-rw-r--r--src/embedded.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/embedded.rs b/src/embedded.rs
index 88c1fb0..61a5f58 100644
--- a/src/embedded.rs
+++ b/src/embedded.rs
@@ -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(())