Skip to content

Commit 78e2992

Browse files
jyn514syphar
authored andcommitted
remove unnecessary dereferences
this was caught by clippy
1 parent a4342e4 commit 78e2992

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bin/cratesfyi.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -502,19 +502,19 @@ enum BlacklistSubcommand {
502502

503503
impl BlacklistSubcommand {
504504
fn handle_args(self, ctx: BinContext) -> Result<()> {
505-
let mut conn = &mut *ctx.conn()?;
505+
let conn = &mut *ctx.conn()?;
506506
match self {
507507
Self::List => {
508-
let crates = db::blacklist::list_crates(&mut conn)
508+
let crates = db::blacklist::list_crates(conn)
509509
.context("failed to list crates on blacklist")?;
510510

511511
println!("{}", crates.join("\n"));
512512
}
513513

514-
Self::Add { crate_name } => db::blacklist::add_crate(&mut conn, &crate_name)
514+
Self::Add { crate_name } => db::blacklist::add_crate(conn, &crate_name)
515515
.context("failed to add crate to blacklist")?,
516516

517-
Self::Remove { crate_name } => db::blacklist::remove_crate(&mut conn, &crate_name)
517+
Self::Remove { crate_name } => db::blacklist::remove_crate(conn, &crate_name)
518518
.context("failed to remove crate from blacklist")?,
519519
}
520520
Ok(())

0 commit comments

Comments
 (0)