File tree 2 files changed +2
-7
lines changed
2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ use std::collections::HashMap;
5
5
6
6
use crate :: models:: Crate ;
7
7
use crate :: schema:: badges;
8
- use crate :: views:: EncodableBadge ;
9
8
10
9
/// A combination of a `Badge` and a crate ID.
11
10
///
@@ -108,11 +107,6 @@ impl Queryable<badges::SqlType, Pg> for Badge {
108
107
}
109
108
110
109
impl Badge {
111
- pub fn encodable ( self ) -> EncodableBadge {
112
- // The serde attributes on Badge ensure it can be deserialized to EncodableBadge
113
- serde_json:: from_value ( serde_json:: to_value ( self ) . unwrap ( ) ) . unwrap ( )
114
- }
115
-
116
110
pub fn update_crate (
117
111
conn : & PgConnection ,
118
112
krate : & Crate ,
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ pub struct EncodableBadge {
12
12
13
13
impl From < Badge > for EncodableBadge {
14
14
fn from ( badge : Badge ) -> Self {
15
- badge. encodable ( )
15
+ // The serde attributes on Badge ensure it can be deserialized to EncodableBadge
16
+ serde_json:: from_value ( serde_json:: to_value ( badge) . unwrap ( ) ) . unwrap ( )
16
17
}
17
18
}
18
19
You can’t perform that action at this time.
0 commit comments