File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,12 @@ fn transmit(
276
276
config. shell ( ) . warn ( & msg) ?;
277
277
}
278
278
279
+ if !warnings. other . is_empty ( ) {
280
+ for msg in warnings. other {
281
+ config. shell ( ) . warn ( & msg) ?;
282
+ }
283
+ }
284
+
279
285
Ok ( ( ) )
280
286
}
281
287
Err ( e) => Err ( e) ,
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ pub struct User {
86
86
pub struct Warnings {
87
87
pub invalid_categories : Vec < String > ,
88
88
pub invalid_badges : Vec < String > ,
89
+ pub other : Vec < String > ,
89
90
}
90
91
91
92
#[ derive( Deserialize ) ]
@@ -223,9 +224,17 @@ impl Registry {
223
224
. map ( |x| x. iter ( ) . flat_map ( |j| j. as_str ( ) ) . map ( Into :: into) . collect ( ) )
224
225
. unwrap_or_else ( Vec :: new) ;
225
226
227
+ let other: Vec < String > = response
228
+ . get ( "warnings" )
229
+ . and_then ( |j| j. get ( "other" ) )
230
+ . and_then ( |j| j. as_array ( ) )
231
+ . map ( |x| x. iter ( ) . flat_map ( |j| j. as_str ( ) ) . map ( Into :: into) . collect ( ) )
232
+ . unwrap_or_else ( Vec :: new) ;
233
+
226
234
Ok ( Warnings {
227
235
invalid_categories,
228
236
invalid_badges,
237
+ other,
229
238
} )
230
239
}
231
240
You can’t perform that action at this time.
0 commit comments