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 {
6060 Ok ( url) => url,
6161 Err ( _) => match base_url. try_into ( ) {
6262 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" ) ,
6464 } ,
6565 } ;
6666
@@ -91,14 +91,13 @@ impl SourceMap {
9191 }
9292
9393 /// 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 >
9595 where
9696 U : TryInto < Url > ,
9797 U :: Error : std:: fmt:: Debug ,
9898 {
99- self . location = location
100- . try_into ( )
101- . expect ( "Could not convert into valid URL" )
99+ self . location = location. try_into ( ) ?;
100+ Ok ( ( ) )
102101 }
103102}
104103
You can’t perform that action at this time.
0 commit comments