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

Commit

Permalink
Merge #244
Browse files Browse the repository at this point in the history
244: Fix clippy warnings r=justahero a=justahero



Co-authored-by: Sebastian Ziebell <sebastian.ziebell@asquera.de>
  • Loading branch information
bors[bot] and justahero authored Aug 2, 2021
2 parents 783724a + 06fb520 commit 7dedeec
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
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

0 comments on commit 7dedeec

Please # to comment.