Tags: tomusdrw/rust-web3
Tags
Fix clippy warnings (#597) * removed unneeded unit return type * borrowed a reference that immediately got dereferenced by the compiler * deleted unnecessary closure for substituting value for `Option::None` * replace match block with `matches!` macro instead * use unwrap_or_else instead to avoid potentially side effects * no need to use question mark here becuase execution of the body will end up there anyway * borrowed a reference that immediately got dereferenced by the compiler * borrowed a reference that immediately got dereferenced by the compiler * when replacing a value of type `T` with `T::default()` std::mem::take is a better option * use the map function instead of implenting it manually * use `.is_empty()` instead of checking the length is bigger then 0 * use `.is_some()` and `is_none()` instead of creating an unused variable * implementing the `From` Trait and we will get the `Into` for free * add `Default` * declare it as u64 instead of cast it to u64 * deleted unnecessary clone * use `assert!` for booleans comparisons Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
PreviousNext