diff options
Diffstat (limited to 'cli/npm/registry.rs')
-rw-r--r-- | cli/npm/registry.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/cli/npm/registry.rs b/cli/npm/registry.rs index 97397350d..9598feba1 100644 --- a/cli/npm/registry.rs +++ b/cli/npm/registry.rs @@ -131,8 +131,7 @@ impl NpmPackageVersionInfo { let version_req = NpmVersionReq::parse(&version_req).with_context(|| { format!( - "error parsing version requirement for dependency: {}@{}", - bare_specifier, version_req + "error parsing version requirement for dependency: {bare_specifier}@{version_req}" ) })?; Ok(NpmDependencyEntry { @@ -369,10 +368,7 @@ impl RealNpmRegistryApiInner { Ok(value) => value, Err(err) => { if cfg!(debug_assertions) { - panic!( - "error loading cached npm package info for {}: {:#}", - name, err - ); + panic!("error loading cached npm package info for {name}: {err:#}"); } else { None } @@ -415,10 +411,7 @@ impl RealNpmRegistryApiInner { self.save_package_info_to_file_cache_result(name, package_info) { if cfg!(debug_assertions) { - panic!( - "error saving cached npm package info for {}: {:#}", - name, err - ); + panic!("error saving cached npm package info for {name}: {err:#}"); } } } @@ -443,8 +436,7 @@ impl RealNpmRegistryApiInner { return Err(custom_error( "NotCached", format!( - "An npm specifier not found in cache: \"{}\", --cached-only is specified.", - name + "An npm specifier not found in cache: \"{name}\", --cached-only is specified." ) )); } |