Skip to content

Commit 94a3df5

Browse files
committed
test+refactor: Move imports out of function scope
1 parent 05623bb commit 94a3df5

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

tests/cli_errors.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,20 @@ pub use _utils::*;
55

66
use command_extra::CommandExtra;
77
use maplit::btreeset;
8+
use parallel_disk_usage::{
9+
bytes_format::BytesFormat,
10+
data_tree::DataTree,
11+
fs_tree_builder::FsTreeBuilder,
12+
os_string_display::OsStringDisplay,
13+
reporter::{ErrorOnlyReporter, ErrorReport},
14+
size_getters::GET_APPARENT_SIZE,
15+
visualizer::{BarAlignment, ColumnWidthDistribution, Direction, Visualizer},
16+
};
817
use pipe_trait::Pipe;
918
use pretty_assertions::assert_eq;
1019
use std::{
1120
collections::BTreeSet,
21+
convert::TryInto,
1222
path::Path,
1323
process::{Command, Output, Stdio},
1424
};
@@ -88,18 +98,6 @@ fn max_depth_0() {
8898
#[cfg(unix)]
8999
#[test]
90100
fn fs_errors() {
91-
use std::convert::TryInto;
92-
93-
use parallel_disk_usage::{
94-
bytes_format::BytesFormat,
95-
data_tree::DataTree,
96-
fs_tree_builder::FsTreeBuilder,
97-
os_string_display::OsStringDisplay,
98-
reporter::{ErrorOnlyReporter, ErrorReport},
99-
size_getters::GET_APPARENT_SIZE,
100-
visualizer::{BarAlignment, ColumnWidthDistribution, Direction, Visualizer},
101-
};
102-
103101
let workspace = SampleWorkspace::default();
104102
fs_permission(workspace.join("empty-dir"), "-r", false);
105103
fs_permission(workspace.join("nested").join("0"), "-r", false);

0 commit comments

Comments
 (0)