Skip to content

Commit 2c3089f

Browse files
author
Jonas Bertossa
committed
fmt: apply nightly rustfmt
1 parent 8b1b5c4 commit 2c3089f

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

src/commands/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ pub fn run(
264264
}
265265
Subcommand::ListFormats => {
266266
// Print a concise explanation + the capability table + the shorthand table.
267-
println!("{}", crate::formats::render_capabilities_and_shorthands(crate::formats::SupportedOp::Any));
267+
println!(
268+
"{}",
269+
crate::formats::render_capabilities_and_shorthands(crate::formats::SupportedOp::Any)
270+
);
268271
Ok(())
269272
}
270273
}

src/error.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
//!
33
//! All usage errors will pass through the Error enum, a lot of them in the Error::Custom.
44
5-
use crate::formats::{self, SupportedOp};
6-
use crate::utils::colors::{BLUE, GREEN, RESET, YELLOW};
7-
use crate::{accessible::is_running_in_accessible_mode, utils::os_str_to_str};
85
use std::{
96
borrow::Cow,
107
ffi::OsString,
118
fmt::{self, Display},
129
io,
1310
};
1411

12+
use crate::{
13+
accessible::is_running_in_accessible_mode,
14+
formats::{self, SupportedOp},
15+
utils::{
16+
colors::{BLUE, GREEN, RESET, YELLOW},
17+
os_str_to_str,
18+
},
19+
};
20+
1521
/// All errors that can be generated by `ouch`
1622
#[derive(Debug, Clone)]
1723
pub enum Error {

src/extension.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ use std::{ffi::OsStr, fmt, path::Path};
44

55
use bstr::ByteSlice;
66

7-
use crate::{
8-
error::{Error, FinalError, Result},
9-
formats,
10-
utils::logger::warning,
11-
};
12-
137
// Re-export the enum so callers can keep using `extension::CompressionFormat::{..}`
148
pub use crate::formats::CompressionFormat;
15-
169
// Re-export supported lists from the single source of truth in formats.rs
1710
pub use crate::formats::KNOWN_SHORTHANDS as SUPPORTED_ALIASES;
1811
pub use crate::formats::KNOWN_SINGLE_EXTS as SUPPORTED_EXTENSIONS;
12+
use crate::{
13+
error::{Error, FinalError, Result},
14+
formats,
15+
utils::logger::warning,
16+
};
1917

2018
/// A wrapper around `CompressionFormat` that allows combinations like `tgz`
2119
#[derive(Debug, Clone)]

src/formats.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! Formats registry, capabilities and pretty table rendering.
22
3-
use crate::utils::colors::{BLUE, RESET, YELLOW};
43
use comfy_table::{presets::UTF8_FULL, Attribute, Cell, CellAlignment, Color, ContentArrangement, Row, Table};
54
use strip_ansi_escapes::strip as strip_ansi;
65
use terminal_size::{terminal_size, Width};
76
use unicode_width::UnicodeWidthStr;
7+
8+
use crate::utils::colors::{BLUE, RESET, YELLOW};
89
/// Accepted formats for input and output.
910
///
1011
/// Notes:

0 commit comments

Comments
 (0)