Skip to content

Commit ea91282

Browse files
author
Test User
committed
chore: add rustfmt and clippy configuration files
- Add .rustfmt.toml with stable-only features - Add clippy.toml to match CI settings - Update code formatting to match new configuration
1 parent 8e4338a commit ea91282

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

.rustfmt.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
max_width = 100
2+
hard_tabs = false
3+
tab_spaces = 4
4+
newline_style = "Auto"
5+
use_small_heuristics = "Default"
6+
reorder_imports = true
7+
reorder_modules = true
8+
remove_nested_parens = true
9+
edition = "2021"
10+
merge_derives = true
11+
use_field_init_shorthand = true
12+
use_try_shorthand = true
13+
force_explicit_abi = true

clippy.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
warn-on-all-wildcard-imports = true
2+
redundant-pattern-matching-deny = true
3+
needless-borrows-for-generic-args-deny = true

src/cli/mod.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,9 @@ mod tests {
212212
}
213213

214214
// Test zsh completion with output
215-
let cli = Cli::try_parse_from([
216-
"essex",
217-
"completion",
218-
"zsh",
219-
"--output",
220-
"/tmp/completions",
221-
])
222-
.unwrap();
215+
let cli =
216+
Cli::try_parse_from(["essex", "completion", "zsh", "--output", "/tmp/completions"])
217+
.unwrap();
223218
match cli.command {
224219
Commands::Completion { shell, output } => {
225220
assert!(matches!(shell, Shell::Zsh));
@@ -245,14 +240,9 @@ mod tests {
245240
let completion_dir = temp_dir.path().join("completions");
246241
fs::create_dir(&completion_dir)?;
247242

248-
let cli = Cli::try_parse_from([
249-
"essex",
250-
"completion",
251-
"zsh",
252-
"--output",
253-
"/tmp/completions",
254-
])
255-
.unwrap();
243+
let cli =
244+
Cli::try_parse_from(["essex", "completion", "zsh", "--output", "/tmp/completions"])
245+
.unwrap();
256246
assert!(cli.execute().is_ok());
257247

258248
Ok(())

0 commit comments

Comments
 (0)