aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/platform.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/platform.rs')
-rw-r--r--crates/shirabe/src/util/platform.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/shirabe/src/util/platform.rs b/crates/shirabe/src/util/platform.rs
index a71fea92..2bb5cf99 100644
--- a/crates/shirabe/src/util/platform.rs
+++ b/crates/shirabe/src/util/platform.rs
@@ -36,10 +36,9 @@ impl Platform {
return Ok(String::new());
}
- return Err(RuntimeException {
- message: "Could not determine the current working directory".to_string(),
- code: 0,
- }
+ return Err(RuntimeException::new(
+ "Could not determine the current working directory".to_string(),
+ )
.into());
}
@@ -159,11 +158,7 @@ impl Platform {
}
}
- Err(RuntimeException {
- message: "Could not determine user directory".to_string(),
- code: 0,
- }
- .into())
+ Err(RuntimeException::new("Could not determine user directory".to_string()).into())
}
/// @return bool Whether the host machine is running on the Windows Subsystem for Linux (WSL)