Skip to content

Commit

Permalink
Fix 1.73.0 clippy warnings (#2674)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Oct 20, 2023
1 parent fc3905a commit e0d0df4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ fn new(
std::env::set_current_dir(parent)?;

let cluster = cfg.provider.cluster.clone();
let programs = cfg.programs.entry(cluster).or_insert(BTreeMap::new());
let programs = cfg.programs.entry(cluster).or_default();
if programs.contains_key(&name) {
return Err(anyhow!("Program already exists"));
}
Expand Down
2 changes: 1 addition & 1 deletion lang/syn/src/idl/parse/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub fn parse(
.map(|a| a.ident.to_string())
.collect::<HashSet<_>>();

let error_name = error.map(|e| e.name).unwrap_or_else(|| "".to_string());
let error_name = error.map(|e| e.name).unwrap_or_default();

// All types that aren't in the accounts section, are in the types section.
for ty_def in ty_defs {
Expand Down

1 comment on commit e0d0df4

@vercel
Copy link

@vercel vercel bot commented on e0d0df4 Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-200ms.vercel.app
www.anchor-lang.com
anchor-docs-git-master-200ms.vercel.app
anchor-lang.com

Please sign in to comment.