diff options
Diffstat (limited to 'core/module_specifier.rs')
-rw-r--r-- | core/module_specifier.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/module_specifier.rs b/core/module_specifier.rs index 832208758..c65f34110 100644 --- a/core/module_specifier.rs +++ b/core/module_specifier.rs @@ -32,17 +32,17 @@ impl Error for ModuleResolutionError { impl fmt::Display for ModuleResolutionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - InvalidUrl(ref err) => write!(f, "invalid URL: {}", err), + InvalidUrl(ref err) => write!(f, "invalid URL: {err}"), InvalidBaseUrl(ref err) => { - write!(f, "invalid base URL for relative import: {}", err) + write!(f, "invalid base URL for relative import: {err}") } - InvalidPath(ref path) => write!(f, "invalid module path: {:?}", path), + InvalidPath(ref path) => write!(f, "invalid module path: {path:?}"), ImportPrefixMissing(ref specifier, ref maybe_referrer) => write!( f, "Relative import path \"{}\" not prefixed with / or ./ or ../{}", specifier, match maybe_referrer { - Some(referrer) => format!(" from \"{}\"", referrer), + Some(referrer) => format!(" from \"{referrer}\""), None => String::new(), } ), @@ -425,7 +425,7 @@ mod tests { ]); // Relative local path. - let expected_url = format!("file://{}/tests/006_url_imports.ts", cwd_str); + let expected_url = format!("file://{cwd_str}/tests/006_url_imports.ts"); tests.extend(vec![ ("tests/006_url_imports.ts", expected_url.to_string()), ("./tests/006_url_imports.ts", expected_url.to_string()), |