File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ pub async fn list(
4848 Option < i64 > ,
4949 Option < i64 > ,
5050 Option < i32 > ,
51+ bool ,
5152 String ,
5253 i32 ,
5354 Option < Vec < Option < String > > > ,
@@ -68,6 +69,7 @@ pub async fn list(
6869 crate_downloads:: downloads. nullable ( ) ,
6970 recent_crate_downloads:: downloads. nullable ( ) ,
7071 default_versions:: num_versions,
72+ versions:: yanked,
7173 versions:: num,
7274 versions:: crate_size,
7375 versions:: bin_names,
@@ -88,6 +90,7 @@ pub async fn list(
8890 downloads,
8991 recent_crate_downloads,
9092 num_versions,
93+ yanked,
9194 default_version_num,
9295 crate_size,
9396 bin_names,
@@ -101,6 +104,7 @@ pub async fn list(
101104 + recent_crate_downloads. unwrap_or_default ( ) ,
102105 num_rev_deps,
103106 num_versions : num_versions. unwrap_or_default ( ) as usize ,
107+ yanked,
104108 default_version_num,
105109 crate_size,
106110 bin_names,
@@ -128,6 +132,7 @@ pub struct AdminCrateInfo {
128132 pub downloads : i64 ,
129133 pub num_rev_deps : i64 ,
130134 pub num_versions : usize ,
135+ pub yanked : bool ,
131136 pub default_version_num : String ,
132137 pub crate_size : i32 ,
133138 pub bin_names : Option < Vec < Option < String > > > ,
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ pub struct AdminCrateInfo {
9595 description : Option < String > ,
9696 downloads : i64 ,
9797 num_versions : usize ,
98+ yanked : bool ,
9899 default_version_num : String ,
99100 num_rev_deps : i64 ,
100101}
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ async fn index_include_yanked() -> anyhow::Result<()> {
7575 assert ! ( json_crate_0. description. is_none( ) ) ;
7676 assert_eq ! ( json_crate_0. downloads, 0 ) ;
7777 assert_eq ! ( json_crate_0. num_versions, 2 ) ;
78+ assert ! ( json_crate_0. yanked) ;
7879 assert_eq ! ( json_crate_0. default_version_num, "2.0.0" ) ;
7980 assert_eq ! ( json_crate_0. num_rev_deps, 0 ) ;
8081
@@ -83,6 +84,7 @@ async fn index_include_yanked() -> anyhow::Result<()> {
8384 assert_eq ! ( json_crate_1. description. as_ref( ) . unwrap( ) , "My Fun Crate" ) ;
8485 assert_eq ! ( json_crate_1. downloads, 536 ) ;
8586 assert_eq ! ( json_crate_1. num_versions, 3 ) ;
87+ assert ! ( !json_crate_1. yanked) ;
8688 assert_eq ! ( json_crate_1. default_version_num, "1.0.0" ) ;
8789 assert_eq ! ( json_crate_1. num_rev_deps, 1 ) ;
8890
You can’t perform that action at this time.
0 commit comments