diff --git a/src/bundler.rs b/src/bundler.rs
index cfd8747..ed95a60 100644
--- a/src/bundler.rs
+++ b/src/bundler.rs
@@ -63,13 +63,12 @@ impl Bundler {
Some(status) => {
let stderr = String::from_utf8_lossy(&output.stderr).to_string();
Err(format!(
- "'bundle' command failed (status: {})\nError: {}",
- status, stderr
+ "'bundle' command failed (status: {status})\nError: {stderr}",
))
}
None => {
let stderr = String::from_utf8_lossy(&output.stderr).to_string();
- Err(format!("Failed to execute 'bundle' command: {}", stderr))
+ Err(format!("Failed to execute 'bundle' command: {stderr}"))
}
})
}
@@ -156,7 +155,7 @@ mod tests {
gem: &str,
) -> MockCommandExecutor {
let mock = MockCommandExecutor::new();
- let gemfile_path = format!("{}/Gemfile", dir);
+ let gemfile_path = format!("{dir}/Gemfile");
mock.expect(
"bundle",
&["info", "--version", gem],
diff --git a/src/gemset.rs b/src/gemset.rs
index 066899d..d8d6a96 100644
--- a/src/gemset.rs
+++ b/src/gemset.rs
@@ -24,7 +24,7 @@ impl Gemset {
path.to_str()
.map(ToString::to_string)
- .ok_or_else(|| format!("Failed to convert path for '{}'", bin_name))
+ .ok_or_else(|| format!("Failed to convert path for '{bin_name}'"))
}
pub fn gem_path_env(&self) -> Vec<(String, String)> {
@@ -43,20 +43,20 @@ impl Gemset {
];
self.execute_gem_command("install".into(), args)
- .map_err(|e| format!("Failed to install gem '{}': {}", name, e))?;
+ .map_err(|e| format!("Failed to install gem '{name}': {e}"))?;
Ok(())
}
pub fn update_gem(&self, name: &str) -> Result<(), String> {
self.execute_gem_command("update".into(), vec![name.into()])
- .map_err(|e| format!("Failed to update gem '{}': {}", name, e))?;
+ .map_err(|e| format!("Failed to update gem '{name}': {e}"))?;
Ok(())
}
pub fn installed_gem_version(&self, name: &str) -> Result