@@ -87,6 +87,7 @@ pub struct EncodableCrate {
87
87
pub license : Option < String > ,
88
88
pub repository : Option < String > ,
89
89
pub links : CrateLinks ,
90
+ pub exact_match : bool ,
90
91
}
91
92
92
93
#[ derive( RustcEncodable , RustcDecodable ) ]
@@ -392,15 +393,16 @@ impl Crate {
392
393
pub fn minimal_encodable ( self ,
393
394
max_version : semver:: Version ,
394
395
badges : Option < Vec < Badge > > ) -> EncodableCrate {
395
- self . encodable ( max_version, None , None , None , badges)
396
+ self . encodable ( max_version, None , None , None , badges, false )
396
397
}
397
398
398
399
pub fn encodable ( self ,
399
400
max_version : semver:: Version ,
400
401
versions : Option < Vec < i32 > > ,
401
402
keywords : Option < & [ Keyword ] > ,
402
403
categories : Option < & [ Category ] > ,
403
- badges : Option < Vec < Badge > > )
404
+ badges : Option < Vec < Badge > > ,
405
+ exact_match : bool )
404
406
-> EncodableCrate {
405
407
let Crate {
406
408
name, created_at, updated_at, downloads, description,
@@ -428,6 +430,7 @@ impl Crate {
428
430
max_version : max_version. to_string ( ) ,
429
431
documentation : documentation,
430
432
homepage : homepage,
433
+ exact_match : exact_match,
431
434
description : description,
432
435
license : license,
433
436
repository : repository,
@@ -841,7 +844,7 @@ pub fn show(req: &mut Request) -> CargoResult<Response> {
841
844
}
842
845
Ok ( req. json ( & R {
843
846
krate : krate. clone ( ) . encodable (
844
- max_version, Some ( ids) , Some ( & kws) , Some ( & cats) , Some ( badges)
847
+ max_version, Some ( ids) , Some ( & kws) , Some ( & cats) , Some ( badges) , false
845
848
) ,
846
849
versions : versions. into_iter ( ) . map ( |v| {
847
850
v. encodable ( & krate. name )
0 commit comments