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 @@ -60,7 +60,7 @@ impl SourceMap {
60
60
Ok ( url) => url,
61
61
Err ( _) => match base_url. try_into ( ) {
62
62
Ok ( base_url) => base_url. join ( header_value. as_str ( ) . trim ( ) ) . status ( 400 ) ?,
63
- Err ( _) => bail ! ( 400 , "Invalid base url provided" ) ,
63
+ Err ( _) => bail ! ( 500 , "Invalid base url provided" ) ,
64
64
} ,
65
65
} ;
66
66
@@ -91,14 +91,13 @@ impl SourceMap {
91
91
}
92
92
93
93
/// Set the url.
94
- pub fn set_location < U > ( & mut self , location : U )
94
+ pub fn set_location < U > ( & mut self , location : U ) -> Result < ( ) , U :: Error >
95
95
where
96
96
U : TryInto < Url > ,
97
97
U :: Error : std:: fmt:: Debug ,
98
98
{
99
- self . location = location
100
- . try_into ( )
101
- . expect ( "Could not convert into valid URL" )
99
+ self . location = location. try_into ( ) ?;
100
+ Ok ( ( ) )
102
101
}
103
102
}
104
103
You can’t perform that action at this time.
0 commit comments