From df3e6fc0dd2e24da11c273babd20c795d9ac3aa7 Mon Sep 17 00:00:00 2001 From: Michael-F-Bryan Date: Thu, 18 Aug 2022 00:02:07 +0800 Subject: [PATCH] Resolved some warnings for rust-lang/rust#93415 --- src/data/lock/lockfile_command.rs | 2 +- src/dataflow/find_command_result.rs | 4 ++-- src/util.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/lock/lockfile_command.rs b/src/data/lock/lockfile_command.rs index c323add5..1588ce55 100644 --- a/src/data/lock/lockfile_command.rs +++ b/src/data/lock/lockfile_command.rs @@ -60,6 +60,6 @@ impl<'a> LockfileCommand { pub enum Error { #[error("The module for this command does not exist. Did you modify the wapm.lock?")] ModuleForCommandDoesNotExist, - #[error("Could not parse the package name and version \"{0}\" for the command \"{}\".")] + #[error("Could not parse the package name and version \"{0}\" for the command \"{1}\".")] CouldNotParsePackageVersionForCommand(String, String), } diff --git a/src/dataflow/find_command_result.rs b/src/dataflow/find_command_result.rs index b6221474..bb122030 100644 --- a/src/dataflow/find_command_result.rs +++ b/src/dataflow/find_command_result.rs @@ -62,11 +62,11 @@ pub enum Error { )] ErrorReadingLocalDirectory(String, String), #[error( - "Command \"{0}\" exists in lockfile, but corresponding module \"{}\" not found in lockfile.", + "Command \"{0}\" exists in lockfile, but corresponding module \"{1}\" not found in lockfile.", )] CommandFoundButCorrespondingModuleIsMissing(String, String), #[error( - "Failed to get command \"{0}\" because there was an error opening the global installation directory. {}", + "Failed to get command \"{0}\" because there was an error opening the global installation directory. {1}", )] CouldNotOpenGlobalsDirectory(String, String), } diff --git a/src/util.rs b/src/util.rs index 7950c23d..7fa6f8d6 100644 --- a/src/util.rs +++ b/src/util.rs @@ -14,7 +14,7 @@ pub static MAX_NAME_LENGTH: usize = 50; pub enum NameError { #[error("Please enter a name")] Empty, - #[error("The name \"{0}\" is too long. It must be {} characters or fewer")] + #[error("The name \"{0}\" is too long. It must be {1} characters or fewer")] NameTooLong(String, usize), #[error( "The name \"{0}\" contains invalid characters. Please use alpha-numeric characters, '-', and '_'",