Skip to content

models::Crate: Remove unused badges() function #5427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/models/krate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::app::App;
use crate::controllers::helpers::pagination::*;
use crate::models::version::TopVersions;
use crate::models::{
Badge, CrateOwner, CrateOwnerInvitation, NewCrateOwnerInvitationOutcome, Owner, OwnerKind,
CrateOwner, CrateOwnerInvitation, NewCrateOwnerInvitationOutcome, Owner, OwnerKind,
ReverseDependency, User, Version,
};
use crate::util::errors::{cargo_err, AppResult};
Expand Down Expand Up @@ -415,12 +415,6 @@ impl Crate {
Ok(())
}

pub fn badges(&self, conn: &PgConnection) -> QueryResult<Vec<Badge>> {
badges::table
.filter(badges::crate_id.eq(self.id))
.load(conn)
}

/// Returns (dependency, dependent crate name, dependent crate downloads)
pub(crate) fn reverse_dependencies(
&self,
Expand Down
1 change: 0 additions & 1 deletion src/tests/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use diesel::prelude::*;

mod account_lock;
mod authentication;
mod badge;
mod blocked_routes;
mod builders;
mod categories;
Expand Down
Loading