Skip to content

Commit

Permalink
fix: cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanLav committed Feb 12, 2025
1 parent 07085da commit 9b63b50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rust/generate_message/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn base_cmd() -> Command {

pub fn assert_cmd_stdout(command: &str, output: &'static str) {
base_cmd()
.args(&command.split(' ').collect::<Vec<&str>>())
.args(command.split(' ').collect::<Vec<&str>>())
.assert()
.success()
.code(0)
Expand Down
2 changes: 1 addition & 1 deletion rust/navigator/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6205,7 +6205,7 @@ fn test_sign_dd_transaction() {
"530102".to_string() + &alice_westend_public + tx + WESTEND_GENESIS;
assert!(signature_is_good(
&non_dynamic_transaction,
&String::from_utf8(transaction.signature.signatures[0].data().to_vec()).unwrap()
core::str::from_utf8(transaction.signature.signatures[0].data()).unwrap()
));
}

Expand Down
5 changes: 1 addition & 4 deletions rust/qr_reader_pc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,7 @@ pub fn arg_parser(arguments: Vec<String>) -> anyhow::Result<CameraSettings> {
let mut settings = CameraSettings { index: None };

while let Some(arg) = args.next() {
let par = match args.next() {
Some(x) => x,
None => String::from(""),
};
let par = args.next().unwrap_or_default();

match &arg[..] {
"d" | "-d" | "--device" => match par.trim().parse() {
Expand Down
4 changes: 2 additions & 2 deletions rust/transaction_parsing/src/cards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub(crate) enum Warning<'a> {
MetadataExtensionsIncomplete,
}

impl<'a> Warning<'a> {
impl Warning<'_> {
pub(crate) fn show(&self) -> String {
match &self {
Warning::AuthorNotFound => String::from("Transaction author public key not found."),
Expand All @@ -97,7 +97,7 @@ impl<'a> Warning<'a> {
}
}

impl<'a> Card<'a> {
impl Card<'_> {
pub(crate) fn card(&self, index: &mut u32, indent: u32) -> TransactionCard {
let card = match &self {
Card::ParserCard(m) => match m {
Expand Down

0 comments on commit 9b63b50

Please sign in to comment.