Skip to content

Commit 747c243

Browse files
author
Max Dymond
committed
Fix clippy moans
Signed-off-by: Max Dymond <max.dymond@microsoft.com>
1 parent 271c4f9 commit 747c243

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/command.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Drop for DaemonHandle {
2828
fn drop(&mut self) {
2929
info!("Stopping daemon docker container '{}'", self.name);
3030
Command::new("docker")
31-
.args(&["kill", &self.name])
31+
.args(["kill", &self.name])
3232
.stdin(Stdio::null())
3333
.stdout(Stdio::null())
3434
.stderr(Stdio::null())
@@ -78,8 +78,8 @@ impl DockerCommandBuilder {
7878
pub fn start_as_daemon(self, command: &[&str]) -> Result<DaemonHandle, Error> {
7979
debug!("Starting daemon container '{}'", self.name);
8080
let exit_status = Command::new("docker")
81-
.args(&["run", "--rm"])
82-
.args(&["--name", &self.name])
81+
.args(["run", "--rm"])
82+
.args(["--name", &self.name])
8383
.args(&self.build_volume_switches())
8484
.args(self.build_environment_switches())
8585
.args(self.build_docker_switches())
@@ -202,6 +202,6 @@ pub fn enable_docker_in_docker(
202202
) -> Result<DockerCommandBuilder, Error> {
203203
Ok(command
204204
.add_docker_switch("--link")
205-
.add_docker_switch(&format!("{}:floki-docker", dind.name()))
205+
.add_docker_switch(format!("{}:floki-docker", dind.name()))
206206
.add_environment("DOCKER_HOST", "tcp://floki-docker:2375"))
207207
}

src/image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pub fn pull_image(name: &str) -> Result<(), Error> {
170170
pub fn image_exists_locally(name: &str) -> Result<bool, Error> {
171171
debug!("Checking for image: {}", name);
172172
let ret = Command::new("docker")
173-
.args(&["history", name])
173+
.args(["history", name])
174174
.stdin(Stdio::null())
175175
.stdout(Stdio::null())
176176
.stderr(Stdio::null())

src/spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ fn get_working_directory(
161161
floki_root: &path::Path,
162162
mount: &path::Path,
163163
) -> path::PathBuf {
164-
mount.join(current_directory.strip_prefix(&floki_root).expect(
164+
mount.join(current_directory.strip_prefix(floki_root).expect(
165165
"failed to deduce working directory - \
166166
floki_root should always be an ancestor of current_directory",
167167
))

0 commit comments

Comments
 (0)