Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Fix clippy warnings #244

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/backtrace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub(crate) fn print(
|| contains_exception;

if print_backtrace && settings.max_backtrace_len > 0 {
pp::backtrace(&frames, &settings);
pp::backtrace(&frames, settings);

if unwind.corrupted {
log::warn!("call stack was corrupted; unwinding could not be completed");
Expand Down
2 changes: 1 addition & 1 deletion src/dep/cratesio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl<'p> Path<'p> {
let mut components = path.components();

let mut registry_prefix = PathBuf::new();
while let Some(component) = components.next() {
for component in &mut components {
registry_prefix.push(component.as_os_str());

if let Component::Normal(component) = component {
Expand Down
4 changes: 2 additions & 2 deletions src/dep/rust_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl<'p> Path<'p> {
let mut components = path.components();

let mut rustup_prefix = PathBuf::new();
while let Some(component) = components.next() {
for component in &mut components {
rustup_prefix.push(component);

if let Component::Normal(component) = component {
Expand All @@ -39,7 +39,7 @@ impl<'p> Path<'p> {
Toolchain::from_str(super::get_component_normal(components.next()?)?.to_str()?);

let mut rust_std_prefix = PathBuf::new();
while let Some(component) = components.next() {
for component in &mut components {
rust_std_prefix.push(component);

if let Component::Normal(component) = component {
Expand Down
2 changes: 1 addition & 1 deletion src/dep/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl<'p> Path<'p> {
let mut components = path.components();

let mut rustc_prefix = PathBuf::new();
while let Some(component) = components.next() {
for component in &mut components {
rustc_prefix.push(component);

if let Component::Normal(component) = component {
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn run_target_program(elf_path: &Path, chip_name: &str, opts: &cli::Opts) -> any

let outcome = backtrace::print(
&mut core,
&elf,
elf,
&target_info.active_ram_region,
&backtrace_settings,
)?;
Expand Down Expand Up @@ -242,7 +242,7 @@ fn decode_and_print_defmt_logs(
opts: &cli::Opts,
) -> Result<(), anyhow::Error> {
loop {
match table.decode(&buffer) {
match table.decode(buffer) {
Ok((frame, consumed)) => {
// NOTE(`[]` indexing) all indices in `table` have already been verified to exist in
// the `locations` map
Expand Down