@@ -7,15 +7,6 @@ use cross::shell::MessageInfo;
77
88#[ derive( Args , Debug ) ]
99pub struct Clean {
10- /// Provide verbose diagnostic output.
11- #[ clap( short, long) ]
12- pub verbose : bool ,
13- /// Do not print cross log messages.
14- #[ clap( short, long) ]
15- pub quiet : bool ,
16- /// Coloring: auto, always, never
17- #[ clap( long) ]
18- pub color : Option < String > ,
1910 /// Force removal of images.
2011 #[ clap( short, long) ]
2112 pub force : bool ,
@@ -32,7 +23,7 @@ pub struct Clean {
3223
3324impl Clean {
3425 pub fn run (
35- self ,
26+ & self ,
3627 engine : cross:: docker:: Engine ,
3728 msg_info : & mut MessageInfo ,
3829 ) -> cross:: Result < ( ) > {
@@ -51,9 +42,6 @@ impl Clean {
5142
5243 // containers -> images -> volumes -> prune to ensure no conflicts.
5344 let remove_containers = RemoveAllContainers {
54- verbose : self . verbose ,
55- quiet : self . quiet ,
56- color : self . color . clone ( ) ,
5745 force : self . force ,
5846 execute : self . execute ,
5947 engine : None ,
@@ -62,9 +50,6 @@ impl Clean {
6250
6351 let remove_images = RemoveImages {
6452 targets : vec ! [ ] ,
65- verbose : self . verbose ,
66- quiet : self . quiet ,
67- color : self . color . clone ( ) ,
6853 force : self . force ,
6954 local : self . local ,
7055 execute : self . execute ,
@@ -73,19 +58,13 @@ impl Clean {
7358 remove_images. run ( engine. clone ( ) , msg_info) ?;
7459
7560 let remove_volumes = RemoveAllVolumes {
76- verbose : self . verbose ,
77- quiet : self . quiet ,
78- color : self . color . clone ( ) ,
7961 force : self . force ,
8062 execute : self . execute ,
8163 engine : None ,
8264 } ;
8365 remove_volumes. run ( engine. clone ( ) , msg_info) ?;
8466
8567 let prune_volumes = PruneVolumes {
86- verbose : self . verbose ,
87- quiet : self . quiet ,
88- color : self . color . clone ( ) ,
8968 execute : self . execute ,
9069 engine : None ,
9170 } ;
@@ -97,16 +76,4 @@ impl Clean {
9776 pub fn engine ( & self ) -> Option < & str > {
9877 self . engine . as_deref ( )
9978 }
100-
101- pub fn verbose ( & self ) -> bool {
102- self . verbose
103- }
104-
105- pub fn quiet ( & self ) -> bool {
106- self . quiet
107- }
108-
109- pub fn color ( & self ) -> Option < & str > {
110- self . color . as_deref ( )
111- }
11279}
0 commit comments