Modernize #35
Modernize #35
clippy
22 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 22 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.88.0 (6b00bc388 2025-06-23)
- cargo 1.88.0 (873a06493 2025-05-10)
- clippy 0.1.88 (6b00bc3880 2025-06-23)
Annotations
Check warning on line 121 in cli/src/main.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> cli/src/main.rs:121:9
|
121 | print!("{}: ", i);
| ^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
121 - print!("{}: ", i);
121 + print!("{i}: ");
|
Check warning on line 156 in trace/src/lib.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/lib.rs:156:42
|
156 | kind_text = theme.color_info(format!("({}) ", kind_text)).to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
156 - kind_text = theme.color_info(format!("({}) ", kind_text)).to_string();
156 + kind_text = theme.color_info(format!("({kind_text}) ")).to_string();
|
Check warning on line 42 in trace/src/lib.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/lib.rs:42:21
|
42 | write!(f, ":{}", column)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
42 - write!(f, ":{}", column)?;
42 + write!(f, ":{column}")?;
|
Check warning on line 40 in trace/src/lib.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/lib.rs:40:17
|
40 | write!(f, ":{}", line)?;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
40 - write!(f, ":{}", line)?;
40 + write!(f, ":{line}")?;
|
Check warning on line 38 in trace/src/lib.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/lib.rs:38:13
|
38 | write!(f, "{}", file)?;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
38 - write!(f, "{}", file)?;
38 + write!(f, "{file}")?;
|
Check warning on line 757 in trace/src/variables/mod.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/variables/mod.rs:757:68
|
757 | VariableDataError::UnimplementedLocationEvaluationStep(format!("{:?}", step)),
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
757 - VariableDataError::UnimplementedLocationEvaluationStep(format!("{:?}", step)),
757 + VariableDataError::UnimplementedLocationEvaluationStep(format!("{step:?}")),
|
Check warning on line 569 in trace/src/variables/mod.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/variables/mod.rs:569:9
|
569 | log::trace!("Location evaluation result: {:?}", result);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
569 - log::trace!("Location evaluation result: {:?}", result);
569 + log::trace!("Location evaluation result: {result:?}");
|
Check warning on line 491 in trace/src/variables/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> trace/src/variables/mod.rs:491:5
|
491 | /// This may be a None if the variable has no location attribute.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
491 | /// This may be a None if the variable has no location attribute.
| ++
Check warning on line 194 in trace/src/variables/mod.rs
github-actions / clippy
methods called `as_*` usually take `self` by reference or `self` by mutable reference
warning: methods called `as_*` usually take `self` by reference or `self` by mutable reference
--> trace/src/variables/mod.rs:194:23
|
194 | fn as_trace_error(self) -> TraceError {
| ^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
Check warning on line 182 in trace/src/variables/mod.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/variables/mod.rs:182:31
|
182 | gotten_value: format!("{:X?}", value),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
182 - gotten_value: format!("{:X?}", value),
182 + gotten_value: format!("{value:X?}"),
|
Check warning on line 129 in trace/src/variables/mod.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/variables/mod.rs:129:31
|
129 | gotten_value: format!("{:X?}", value),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
129 - gotten_value: format!("{:X?}", value),
129 + gotten_value: format!("{value:X?}"),
|
Check warning on line 75 in trace/src/variables/mod.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> trace/src/variables/mod.rs:75:17
|
75 | return Ok("subroutine".into());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
75 - return Ok("subroutine".into());
75 + Ok("subroutine".into())
|
Check warning on line 71 in trace/src/variables/mod.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> trace/src/variables/mod.rs:71:17
|
71 | return Ok("array".into());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
71 - return Ok("array".into());
71 + Ok("array".into())
|
Check warning on line 51 in trace/src/platform/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> trace/src/platform/mod.rs:51:5
|
51 | /// This must be the exact same elf file as the one the device was running. Even a recompilation of the exact same code can change the de...
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
51 | /// This must be the exact same elf file as the one the device was running. Even a recompilation of the exact same code can change the debug info.
| ++
Check warning on line 49 in trace/src/platform/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> trace/src/platform/mod.rs:49:5
|
49 | /// The standard set of registers is also required to be present.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
49 | /// The standard set of registers is also required to be present.
| ++
Check warning on line 48 in trace/src/platform/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> trace/src/platform/mod.rs:48:5
|
48 | /// then eventually the tracing procedure will find a corrupt frame.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
48 | /// then eventually the tracing procedure will find a corrupt frame.
| ++
Check warning on line 47 in trace/src/platform/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> trace/src/platform/mod.rs:47:5
|
47 | /// It is required to have a decent chunk of the stack present. If not all of the stack is present,
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
47 | /// It is required to have a decent chunk of the stack present. If not all of the stack is present,
| ++
Check warning on line 46 in trace/src/platform/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> trace/src/platform/mod.rs:46:5
|
46 | /// It is not necessary to include any data that is present in the elf file because that will automatically be added.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
46 | /// It is not necessary to include any data that is present in the elf file because that will automatically be added.
| ++
Check warning on line 301 in trace/src/platform/cortex_m/mod.rs
github-actions / clippy
variables can be used directly in the `format!` string
warning: variables can be used directly in the `format!` string
--> trace/src/platform/cortex_m/mod.rs:298:62
|
298 | ... frame_type: FrameType::Corrupted(format!(
| ________________________________________________________^
299 | | ... "Could not read address {:#10X} from the stack",
300 | | ... address
301 | | ... )),
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
Check warning on line 239 in trace/src/variables/mod.rs
github-actions / clippy
`crate` references the macro call's crate
warning: `crate` references the macro call's crate
--> trace/src/variables/mod.rs:239:17
|
239 | Err(crate::variables::GetEntryTreeError::WrongUnit(target_unit)) => {
| ^^^^^ help: to reference the macro definition's crate, use: `$crate`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def
Check warning on line 213 in trace/src/variables/mod.rs
github-actions / clippy
`crate` references the macro call's crate
warning: `crate` references the macro call's crate
--> trace/src/variables/mod.rs:213:17
|
213 | Err(crate::variables::GetEntryTreeError::WrongUnit(target_unit)) => {
| ^^^^^ help: to reference the macro definition's crate, use: `$crate`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def
= note: `#[warn(clippy::crate_in_macro_def)]` on by default
Check warning on line 320 in core/src/register_data.rs
github-actions / clippy
manual slice size calculation
warning: manual slice size calculation
--> core/src/register_data.rs:320:36
|
320 | let remaining_length = 5 + self.registers.len() * core::mem::size_of::<RB>() - self.index;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::mem::size_of_val(self.registers)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_slice_size_calculation
= note: `#[warn(clippy::manual_slice_size_calculation)]` on by default