fix(imports): fix panic on unsupported scheme (#5131)

This commit is contained in:
Bartek Iwańczuk 2020-05-07 15:57:10 +02:00 committed by GitHub
parent dabe88f854
commit 0ba90c8c11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 1 deletions

View file

@ -93,7 +93,7 @@ impl SourceFileFetcher {
Ok(file_fetcher)
}
fn check_if_supported_scheme(url: &Url) -> Result<(), ErrBox> {
pub fn check_if_supported_scheme(url: &Url) -> Result<(), ErrBox> {
if !SUPPORTED_URL_SCHEMES.contains(&url.scheme()) {
return Err(
OpError::other(