File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,12 @@ fn transmit(
276276 config. shell ( ) . warn ( & msg) ?;
277277 }
278278
279+ if !warnings. other . is_empty ( ) {
280+ for msg in warnings. other {
281+ config. shell ( ) . warn ( & msg) ?;
282+ }
283+ }
284+
279285 Ok ( ( ) )
280286 }
281287 Err ( e) => Err ( e) ,
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ pub struct User {
8686pub struct Warnings {
8787 pub invalid_categories : Vec < String > ,
8888 pub invalid_badges : Vec < String > ,
89+ pub other : Vec < String > ,
8990}
9091
9192#[ derive( Deserialize ) ]
@@ -223,9 +224,17 @@ impl Registry {
223224 . map ( |x| x. iter ( ) . flat_map ( |j| j. as_str ( ) ) . map ( Into :: into) . collect ( ) )
224225 . unwrap_or_else ( Vec :: new) ;
225226
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+
226234 Ok ( Warnings {
227235 invalid_categories,
228236 invalid_badges,
237+ other,
229238 } )
230239 }
231240
You can’t perform that action at this time.
0 commit comments