File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,7 @@ fn normalize_ssh_url(url: &str) -> Result<Url> {
332
332
/// `normalize_file_path` takes in a filepath and uses `Url::from_file_path()` to parse
333
333
///
334
334
/// Prepends `file://` to url
335
+ #[ cfg( any( unix, windows, target_os = "redox" , target_os = "wasi" ) ) ]
335
336
fn normalize_file_path ( filepath : & str ) -> Result < Url > {
336
337
let fp = Url :: from_file_path ( filepath) ;
337
338
@@ -342,6 +343,11 @@ fn normalize_file_path(filepath: &str) -> Result<Url> {
342
343
}
343
344
}
344
345
346
+ #[ cfg( target_arch = "wasm32" ) ]
347
+ fn normalize_file_path ( _filepath : & str ) -> Result < Url > {
348
+ unreachable ! ( )
349
+ }
350
+
345
351
/// `normalize_url` takes in url as `&str` and takes an opinionated approach to identify
346
352
/// `ssh://` or `file://` urls that require more information to be added so that
347
353
/// they can be parsed more effectively by `url::Url::parse()`
You can’t perform that action at this time.
0 commit comments