Skip to content

Commit 6b309d5

Browse files
committed
chore: format clippy fixes
1 parent 86f3e61 commit 6b309d5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

crates/lsp/src/checkers/pyo3_embedded.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl PyO3EmbeddedChecker {
136136
beancount_errors.push(BeancountError::new(
137137
journal_file.to_path_buf(),
138138
0,
139-
format!("Failed to process beancount error: {}", e),
139+
format!("Failed to process beancount error: {e}"),
140140
));
141141
}
142142
}

crates/lsp/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ fn setup_logging(log_to_file: bool, log_level_arg: Option<&String>) {
5151
Some(level_str) => parse_log_level(level_str),
5252
None => {
5353
if log_to_file {
54-
LevelFilter::DEBUG // Default level when logging to file
54+
LevelFilter::DEBUG // Default level when logging to file
5555
} else {
56-
LevelFilter::INFO // Default level when logging to stderr
56+
LevelFilter::INFO // Default level when logging to stderr
5757
}
5858
}
5959
};
@@ -101,7 +101,7 @@ fn parse_log_level(level_str: &str) -> LevelFilter {
101101
"error" => LevelFilter::ERROR,
102102
"off" => LevelFilter::OFF,
103103
_ => {
104-
eprintln!("Invalid log level '{}'. Using 'info' as default. Valid levels: trace, debug, info, warn, error, off", level_str);
104+
eprintln!("Invalid log level '{level_str}'. Using 'info' as default. Valid levels: trace, debug, info, warn, error, off");
105105
LevelFilter::INFO
106106
}
107107
}

crates/lsp/src/providers/completion.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,12 +2239,12 @@ include "accounts1.bean"
22392239
.unwrap_or_default();
22402240

22412241
let labels: Vec<&String> = items.iter().map(|item| &item.label).collect();
2242-
2242+
22432243
// Should return only the parts after "Assets:Checking:"
22442244
assert_eq!(items.len(), 2);
22452245
assert!(labels.contains(&&"Personal".to_string()));
22462246
assert!(labels.contains(&&"Business".to_string()));
2247-
2247+
22482248
// Should NOT contain full account paths
22492249
assert!(!labels.contains(&&"Assets:Checking:Personal".to_string()));
22502250
assert!(!labels.contains(&&"Assets:Checking:Business".to_string()));
@@ -2254,7 +2254,7 @@ include "accounts1.bean"
22542254
fn test_top_level_colon_completion() {
22552255
// Test completion at top level (e.g., typing "Assets:")
22562256
let fixture = r#"
2257-
%! /main.beancount
2257+
%! /main.beancount
22582258
2023-10-01 open Assets:Checking USD
22592259
2023-10-01 open Assets:Savings USD
22602260
2023-10-01 open Expenses:Food USD
@@ -2270,12 +2270,12 @@ include "accounts1.bean"
22702270
.unwrap_or_default();
22712271

22722272
let labels: Vec<&String> = items.iter().map(|item| &item.label).collect();
2273-
2273+
22742274
// Should return only the parts after "Assets:"
22752275
assert_eq!(items.len(), 2);
22762276
assert!(labels.contains(&&"Checking".to_string()));
22772277
assert!(labels.contains(&&"Savings".to_string()));
2278-
2278+
22792279
// Should NOT contain full account paths or accounts from other hierarchies
22802280
assert!(!labels.contains(&&"Assets:Checking".to_string()));
22812281
assert!(!labels.contains(&&"Food".to_string()));

0 commit comments

Comments
 (0)