Skip to content

Commit

Permalink
fix clippy lints; deprecated update_authority_nft field on set-and-ve…
Browse files Browse the repository at this point in the history
…rify-nft (samuelvanderwaal#290)
  • Loading branch information
samuelvanderwaal authored Aug 30, 2023
1 parent 1663dcc commit befc8d5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
7 changes: 3 additions & 4 deletions src/collections/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,18 @@ pub async fn check_collection_items(
(Ok(res), _index, remaining) => {
handles = remaining;

if res.is_ok() {
let (mint, collection_opt) = res.unwrap();
if let Ok((mint, collection_opt)) = res {
match collection_opt {
Some(collection) => {
collections
.entry(collection.key.to_string())
.or_insert_with(Vec::new)
.or_default()
.push(mint.to_string());
}
None => {
collections
.entry("none".to_string())
.or_insert_with(Vec::new)
.or_default()
.push(mint.to_string());
}
}
Expand Down
1 change: 0 additions & 1 deletion src/collections/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ pub fn set_and_verify_nft_collection(
keypair_path: Option<String>,
nft_mint: String,
collection_mint: String,
_nft_auth: String,
is_delegate_present: bool,
) -> AnyResult<()> {
let solana_opts = parse_solana_config();
Expand Down
5 changes: 3 additions & 2 deletions src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,10 @@ pub enum CollectionsSubcommands {
#[structopt(short = "n", long)]
nft_mint: String,

/// NFT update authority
/// NFT update authority: deprecated--does not need to be passed in
#[deprecated]
#[structopt(short, long)]
update_authority_nft: String,
update_authority_nft: Option<String>,

/// Option if the signing keypair is a collection authority delegate.
#[structopt(short = "d", long)]
Expand Down
12 changes: 3 additions & 9 deletions src/process_subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,14 @@ pub async fn process_collections(
nft_mint,
} => unverify_nft_collection(client, keypair, nft_mint, collection_mint, is_delegate),

#[allow(deprecated)]
CollectionsSubcommands::SetAndVerifyCollection {
keypair,
nft_mint,
update_authority_nft,
collection_mint,
update_authority_nft: _,
is_delegate,
} => set_and_verify_nft_collection(
client,
keypair,
nft_mint,
collection_mint,
update_authority_nft,
is_delegate,
),
} => set_and_verify_nft_collection(client, keypair, nft_mint, collection_mint, is_delegate),

CollectionsSubcommands::ApproveAuthority {
keypair,
Expand Down

0 comments on commit befc8d5

Please sign in to comment.