Skip to content

Commit acda29c

Browse files
sgmarzChrisDryden
authored andcommitted
install and test_install: run cargo 'fmt'
1 parent 4153088 commit acda29c

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

src/uu/install/src/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use uucore::backup_control::{self, BackupMode};
2424
use uucore::buf_copy::copy_stream;
2525
use uucore::display::Quotable;
2626
use uucore::entries::{grp2gid, usr2uid};
27+
use uucore::error::UIoError;
2728
use uucore::error::{FromIo, UError, UResult, UUsageError};
2829
use uucore::fs::dir_strip_dot_for_creation;
2930
use uucore::perms::{Verbosity, VerbosityLevel, wrap_chown};
@@ -35,7 +36,6 @@ use uucore::selinux::{
3536
};
3637
use uucore::translate;
3738
use uucore::{format_usage, show, show_error, show_if_err};
38-
use uucore::error::UIoError;
3939

4040
#[cfg(unix)]
4141
use std::os::unix::fs::MetadataExt;

tests/by-util/test_install.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,24 @@ fn test_install_ancestors_mode_directories() {
123123
fn test_install_remove_impermissible_dst_file() {
124124
let src_file = "/dev/null";
125125
let dst_file = "/dev/full";
126-
new_ucmd!().args(&[src_file, dst_file]).fails().stderr_only(format!(
127-
"install: failed to remove existing file '{dst_file}': Permission denied\n"
128-
));
126+
new_ucmd!()
127+
.args(&[src_file, dst_file])
128+
.fails()
129+
.stderr_only(format!(
130+
"install: failed to remove existing file '{dst_file}': Permission denied\n"
131+
));
129132
}
130133

131134
#[test]
132135
fn test_install_remove_inaccessible_dst_file() {
133136
let src_file = "/dev/null";
134137
let dst_file = "/root/file";
135-
new_ucmd!().args(&[src_file, dst_file]).fails().stderr_only(format!(
136-
"install: cannot stat '{dst_file}': Permission denied\n"
137-
));
138+
new_ucmd!()
139+
.args(&[src_file, dst_file])
140+
.fails()
141+
.stderr_only(format!(
142+
"install: cannot stat '{dst_file}': Permission denied\n"
143+
));
138144
}
139145

140146
#[test]

0 commit comments

Comments
 (0)