Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Add minor refactorings #754

Merged
merged 1 commit into from
Sep 4, 2021
Merged

Add minor refactorings #754

merged 1 commit into from
Sep 4, 2021

Conversation

tranzystorekk
Copy link
Contributor

Standards checklist:

  • The PR title is descriptive.
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself
    • I also tested that Topgrade skips the step where needed

Highlights:

  • Use impl IntoIterator for arrays to remove some ampersands
  • Use nested or patterns where applicable

_ => {
continue;
}
Ok(Key::Char('s' | 'S')) => run_shell(),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice. Could you tell me which feature of Rust are you using here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nested "or patterns", introduced in Rust 1.53

@r-darwish r-darwish merged commit 1478d07 into r-darwish:develop Sep 4, 2021
@r-darwish
Copy link
Owner

This is really nice. Thank you!

@tranzystorekk tranzystorekk deleted the refactor-v1 branch September 4, 2021 18:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants