Skip to content

Commit a1e2b42

Browse files
committed
fix CI formatting and linter errors
1 parent b588545 commit a1e2b42

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

bear/src/semantic/command.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,10 @@ mod test {
246246
(ArgumentKind::Output, vec!["-o", "main.o"]),
247247
],
248248
);
249-
let mut config = FormatConfig::default();
250-
config.command_field_as_array = false;
249+
let config = FormatConfig {
250+
keep_output_field: true,
251+
command_field_as_array: false,
252+
};
251253
let entries = sut.to_entries(&config);
252254

253255
assert_eq!(entries.len(), 1);
@@ -274,8 +276,10 @@ mod test {
274276
(ArgumentKind::Output, vec!["-o", "main.o"]),
275277
],
276278
);
277-
let mut config = FormatConfig::default();
278-
config.keep_output_field = false;
279+
let config = FormatConfig {
280+
command_field_as_array: true,
281+
keep_output_field: false,
282+
};
279283
let entries = sut.to_entries(&config);
280284

281285
assert_eq!(entries.len(), 1);

bear/src/semantic/interpreters/combinators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mod test {
4949
let input = execution_fixture();
5050

5151
assert!(
52-
matches!(sut.recognize(&input), None),
52+
sut.recognize(&input).is_none(),
5353
"Expected None, but got a match"
5454
);
5555
}
@@ -67,7 +67,7 @@ mod test {
6767
let input = execution_fixture();
6868

6969
assert!(
70-
matches!(sut.recognize(&input), Some(_)),
70+
sut.recognize(&input).is_some(),
7171
"Expected Some(_), got a match"
7272
);
7373
}

bear/src/semantic/interpreters/generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ mod test {
188188
);
189189
let result = SUT.recognize(&input);
190190

191-
assert!(matches!(result, None));
191+
assert!(result.is_none());
192192
}
193193

194194
#[test]

bear/src/semantic/interpreters/ignore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mod test {
176176
let sut = IgnoreByPath::new();
177177
let result = sut.recognize(&input);
178178

179-
assert!(matches!(result, Some(_)));
179+
assert!(result.is_some());
180180
}
181181

182182
#[test]
@@ -190,6 +190,6 @@ mod test {
190190
let sut = IgnoreByPath::new();
191191
let result = sut.recognize(&input);
192192

193-
assert!(matches!(result, None));
193+
assert!(result.is_none());
194194
}
195195
}

bear/src/semantic/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! - [`Formattable`]: Trait for converting recognized commands into output entries.
1313
//! - [`FormatConfig`]: Configuration for formatting output entries.
1414
//!
15-
//! Implementors of [`Interpreter`] analyze an `Execution` and determine if it matches a known command.
15+
//! Implementers of [`Interpreter`] analyze an `Execution` and determine if it matches a known command.
1616
//! If recognized, they return a boxed [`Command`] representing the semantic meaning of the execution.
1717
//!
1818
//! The [`Formattable`] trait allows recognized commands to be transformed into output entries (e.g.,
@@ -42,7 +42,7 @@ pub enum Command {
4242

4343
/// Responsible for recognizing the semantic meaning of an executed command.
4444
///
45-
/// Implementors of this trait analyze an [`Execution`] and determine if it matches
45+
/// Implementers of this trait analyze an [`Execution`] and determine if it matches
4646
/// a known command (such as a compiler or interpreter). If recognized, they
4747
/// return a [`Command`] representing the semantic meaning of the execution.
4848
pub trait Interpreter: Send {

0 commit comments

Comments
 (0)