Skip to content

Commit

Permalink
some clippy fix (open-web3-stack#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc authored Oct 2, 2023
1 parent 581a55e commit 22a4f7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build-script-utils/src/license.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use walkdir::{DirEntry, WalkDir};
// source file.
pub fn check_file_licenses<P: AsRef<Path>>(path: P, expected_license_text: &[u8], exclude_paths: &[&str]) {
// The following directories will be excluded from the license scan.
let skips = vec!["artifacts", "corpus", "target", "fuzz_targets"];
let skips = ["artifacts", "corpus", "target", "fuzz_targets"];

let path = path.as_ref();

Expand Down
2 changes: 1 addition & 1 deletion oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
pub fn read_raw_values(key: &T::OracleKey) -> Vec<TimestampedValueOf<T, I>> {
T::Members::sorted_members()
.iter()
.chain(vec![T::RootOperatorAccountId::get()].iter())
.chain([T::RootOperatorAccountId::get()].iter())
.filter_map(|x| Self::raw_values(x, key))
.collect()
}
Expand Down
14 changes: 6 additions & 8 deletions xtokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,14 +725,12 @@ pub mod module {
) -> Result<Xcm<T::RuntimeCall>, DispatchError> {
let mut reanchored_dest = dest;
if reserve == MultiLocation::parent() {
match dest {
MultiLocation {
parents,
interior: X1(Parachain(id)),
} if parents == 1 => {
reanchored_dest = Parachain(id).into();
}
_ => {}
if let MultiLocation {
parents: 1,
interior: X1(Parachain(id)),
} = dest
{
reanchored_dest = Parachain(id).into();
}
}

Expand Down

0 comments on commit 22a4f7b

Please sign in to comment.