From dccc89f3ee2124b004d1de1394093de28f0425f0 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Fri, 8 Feb 2019 16:04:23 -0500 Subject: [PATCH] Reduce the number of places we need to specify version::ALL_COLUMNS --- src/bin/delete-version.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/delete-version.rs b/src/bin/delete-version.rs index 13dab868128..549d3156df3 100644 --- a/src/bin/delete-version.rs +++ b/src/bin/delete-version.rs @@ -9,7 +9,7 @@ use cargo_registry::{ db, - models::{Crate, Version}, + models::{Crate, CrateVersions, Version}, schema::versions, }; use std::{ @@ -45,9 +45,9 @@ fn delete(conn: &PgConnection) { }; let krate = Crate::by_name(&name).first::(conn).unwrap(); - let v = Version::belonging_to(&krate) + let v = krate + .all_versions() .filter(versions::num.eq(&version)) - .select(cargo_registry::models::version::ALL_COLUMNS) .first::(conn) .unwrap(); print!(