Skip to content

Commit 449f208

Browse files
committed
chore: fix clippy warnings
1 parent 13220ef commit 449f208

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

core/src/runtime.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,19 @@ impl RuntimeFile {
8181
fn read(&self) -> String {
8282
match self {
8383
RuntimeFile::Embedded { path: _, content } => {
84-
return String::from_utf8_lossy(content).into_owned();
84+
String::from_utf8_lossy(content).into_owned()
8585
}
8686
RuntimeFile::Local { path } => {
87-
return std::fs::read_to_string(path).unwrap();
87+
// TODO: Improve on this by not panicking on invalid file path
88+
std::fs::read_to_string(path).unwrap()
8889
}
8990
}
9091
}
9192

9293
fn get_path(&self) -> &str {
9394
match self {
94-
RuntimeFile::Embedded { path, content: _ } => {
95-
return path;
96-
}
97-
RuntimeFile::Local { path } => {
98-
return path;
99-
}
95+
RuntimeFile::Embedded { path, content: _ } => path,
96+
RuntimeFile::Local { path } => path,
10097
}
10198
}
10299
}

0 commit comments

Comments
 (0)