Skip to content

Commit

Permalink
chore: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jul 10, 2024
1 parent d80b98b commit ffc026d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl RgbArgs {
if self.verbose > 1 {
eprint!("stock file is absent, creating a new one ... ");
}
fs::create_dir_all(stock_path.to_owned())?;
fs::create_dir_all(&stock_path)?;
let stock = Stock::new(stock_path.to_owned());
stock.store()?;
return Ok(stock)
Expand Down
6 changes: 3 additions & 3 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ impl Exec for RgbArgs {
let mut resolver = self.resolver()?;
eprint!("- validating the contract {} ... ", contract.contract_id());
let contract = contract
.validate(&mut resolver, self.general.network.is_testnet())
.validate(&resolver, self.general.network.is_testnet())
.map_err(|(status, _)| {
eprintln!("failure");
status.to_string()
Expand Down Expand Up @@ -1046,7 +1046,7 @@ impl Exec for RgbArgs {
let consignment = Transfer::load_file(file)?;
resolver.add_terminals(&consignment);
let status =
match consignment.validate(&mut resolver, self.general.network.is_testnet()) {
match consignment.validate(&resolver, self.general.network.is_testnet()) {
Ok(consignment) => consignment.into_validation_status(),
Err((status, _)) => status,
};
Expand All @@ -1063,7 +1063,7 @@ impl Exec for RgbArgs {
let transfer = Transfer::load_file(file)?;
resolver.add_terminals(&transfer);
let valid = transfer
.validate(&mut resolver, self.general.network.is_testnet())
.validate(&resolver, self.general.network.is_testnet())
.map_err(|(status, _)| status)?;
stock.accept_transfer(valid, &mut resolver)?;
eprintln!("Transfer accepted into the stash");
Expand Down
1 change: 1 addition & 0 deletions src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ where
for<'de> WalletDescr<K, D>: serde::Serialize + serde::Deserialize<'de>,
for<'de> D: serde::Serialize + serde::Deserialize<'de>,
{
#[allow(clippy::result_large_err)]
pub fn load(
stock_path: impl ToOwned<Owned = PathBuf>,
wallet_path: impl AsRef<Path>,
Expand Down

0 comments on commit ffc026d

Please sign in to comment.