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(
48
48
Option < i64 > ,
49
49
Option < i64 > ,
50
50
Option < i32 > ,
51
+ bool ,
51
52
String ,
52
53
i32 ,
53
54
Option < Vec < Option < String > > > ,
@@ -68,6 +69,7 @@ pub async fn list(
68
69
crate_downloads:: downloads. nullable ( ) ,
69
70
recent_crate_downloads:: downloads. nullable ( ) ,
70
71
default_versions:: num_versions,
72
+ versions:: yanked,
71
73
versions:: num,
72
74
versions:: crate_size,
73
75
versions:: bin_names,
@@ -88,6 +90,7 @@ pub async fn list(
88
90
downloads,
89
91
recent_crate_downloads,
90
92
num_versions,
93
+ yanked,
91
94
default_version_num,
92
95
crate_size,
93
96
bin_names,
@@ -101,6 +104,7 @@ pub async fn list(
101
104
+ recent_crate_downloads. unwrap_or_default ( ) ,
102
105
num_rev_deps,
103
106
num_versions : num_versions. unwrap_or_default ( ) as usize ,
107
+ yanked,
104
108
default_version_num,
105
109
crate_size,
106
110
bin_names,
@@ -128,6 +132,7 @@ pub struct AdminCrateInfo {
128
132
pub downloads : i64 ,
129
133
pub num_rev_deps : i64 ,
130
134
pub num_versions : usize ,
135
+ pub yanked : bool ,
131
136
pub default_version_num : String ,
132
137
pub crate_size : i32 ,
133
138
pub bin_names : Option < Vec < Option < String > > > ,
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ pub struct AdminCrateInfo {
95
95
description : Option < String > ,
96
96
downloads : i64 ,
97
97
num_versions : usize ,
98
+ yanked : bool ,
98
99
default_version_num : String ,
99
100
num_rev_deps : i64 ,
100
101
}
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ async fn index_include_yanked() -> anyhow::Result<()> {
75
75
assert ! ( json_crate_0. description. is_none( ) ) ;
76
76
assert_eq ! ( json_crate_0. downloads, 0 ) ;
77
77
assert_eq ! ( json_crate_0. num_versions, 2 ) ;
78
+ assert ! ( json_crate_0. yanked) ;
78
79
assert_eq ! ( json_crate_0. default_version_num, "2.0.0" ) ;
79
80
assert_eq ! ( json_crate_0. num_rev_deps, 0 ) ;
80
81
@@ -83,6 +84,7 @@ async fn index_include_yanked() -> anyhow::Result<()> {
83
84
assert_eq ! ( json_crate_1. description. as_ref( ) . unwrap( ) , "My Fun Crate" ) ;
84
85
assert_eq ! ( json_crate_1. downloads, 536 ) ;
85
86
assert_eq ! ( json_crate_1. num_versions, 3 ) ;
87
+ assert ! ( !json_crate_1. yanked) ;
86
88
assert_eq ! ( json_crate_1. default_version_num, "1.0.0" ) ;
87
89
assert_eq ! ( json_crate_1. num_rev_deps, 1 ) ;
88
90
You can’t perform that action at this time.
0 commit comments