File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments