Skip to content

Commit 14a52dd

Browse files
authored
fix: Resolve cargo fmt formatting errors and rustfmt config deprecations (#203)
- Remove unstable rustfmt options (comment_width, wrap_comments, fn_single_line, space_* settings, struct_* settings) - Replace deprecated fn_args_layout with fn_params_layout - Add trailing commas to match arms in mimi-cli/main.rs - Reorder modules alphabetically in mimi-core/lib.rs - Verify with 'cargo fmt --check' passes cleanly
1 parent e710bd0 commit 14a52dd

3 files changed

Lines changed: 5 additions & 20 deletions

File tree

.rustfmt.toml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,8 @@ tab_spaces = 4
1414
reorder_imports = true
1515
reorder_modules = true
1616

17-
# Comments
18-
comment_width = 80
19-
wrap_comments = true
20-
2117
# Functions
22-
fn_args_layout = "Tall"
23-
fn_single_line = false
24-
25-
# Structures
26-
struct_literal_style = "Block"
27-
struct_literal_width = 18
28-
struct_trailing_comma = "Vertical"
18+
fn_params_layout = "Tall"
2919

3020
# Match expressions
3121
match_block_trailing_comma = true
32-
33-
# Spaces
34-
space_after_colon = true
35-
space_before_colon = false
36-
spaces_around_ranges = false

crates/mimi-cli/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ async fn main() -> anyhow::Result<()> {
4242
if let Some(config_path) = config {
4343
info!("Using config: {}", config_path);
4444
}
45-
}
45+
},
4646
Some(Commands::Version) => {
4747
println!("mimi {}", env!("CARGO_PKG_VERSION"));
48-
}
48+
},
4949
None => {
5050
println!("MiMi v{}", env!("CARGO_PKG_VERSION"));
5151
println!("Use --help for usage information");
52-
}
52+
},
5353
}
5454

5555
Ok(())

crates/mimi-core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
//! This module contains the fundamental components and trait definitions
44
//! for the MiMi cognitive operating system.
55
6+
pub mod config;
67
pub mod error;
78
pub mod message;
8-
pub mod config;
99

1010
pub use error::{Error, Result};
1111

0 commit comments

Comments
 (0)