File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ impl FileSourceFile {
35
35
36
36
// First check for an _exact_ match
37
37
if filename. is_file ( ) {
38
- return if let Some ( format) = format_hint {
39
- Ok ( ( filename, Box :: new ( format) ) )
38
+ if let Some ( format) = format_hint {
39
+ return Ok ( ( filename, Box :: new ( format) ) ) ;
40
40
} else {
41
41
for ( format, extensions) in all_extensions ( ) . iter ( ) {
42
42
if extensions. contains (
@@ -49,14 +49,13 @@ impl FileSourceFile {
49
49
return Ok ( ( filename, Box :: new ( * format) ) ) ;
50
50
}
51
51
}
52
-
53
- Err ( Box :: new ( io:: Error :: new (
52
+ return Err ( Box :: new ( io:: Error :: new (
54
53
io:: ErrorKind :: NotFound ,
55
54
format ! (
56
55
"configuration file \" {}\" is not of a registered file format" ,
57
56
filename. to_string_lossy( )
58
57
) ,
59
- ) ) )
58
+ ) ) ) ;
60
59
} ;
61
60
}
62
61
You can’t perform that action at this time.
0 commit comments