Skip to content

Commit

Permalink
Fix clippy 1.78.0 lints (#2971)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored May 16, 2024
1 parent b7dff46 commit 518b73f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "anchor-cli"
version = "0.30.0"
authors = ["Anchor Maintainers <accounts@200ms.io>"]
rust-version = "1.60"
edition = "2021"
repository = "https://github.com/coral-xyz/anchor"
description = "Anchor CLI"
Expand Down
13 changes: 7 additions & 6 deletions cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ where
deserializer.deserialize_any(StringOrCustomCluster(PhantomData))
}

impl ToString for Config {
fn to_string(&self) -> String {
impl fmt::Display for Config {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let programs = {
let c = ser_programs(&self.programs);
if c.is_empty() {
Expand All @@ -629,7 +629,8 @@ impl ToString for Config {
.then(|| self.workspace.clone()),
};

toml::to_string(&cfg).expect("Must be well formed")
let cfg = toml::to_string(&cfg).expect("Must be well formed");
write!(f, "{}", cfg)
}
}

Expand Down Expand Up @@ -1395,9 +1396,9 @@ macro_rules! home_path {
}
}

impl ToString for $my_struct {
fn to_string(&self) -> String {
self.0.clone()
impl fmt::Display for $my_struct {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion spl/src/token_2022_extensions/group_pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn group_pointer_update<'info>(
ctx.accounts.token_program_id.key,
ctx.accounts.mint.key,
ctx.accounts.authority.key,
&[&ctx.accounts.authority.key],
&[ctx.accounts.authority.key],
group_address,
)?;
anchor_lang::solana_program::program::invoke_signed(
Expand Down

0 comments on commit 518b73f

Please sign in to comment.