@@ -59,10 +59,11 @@ struct Settings {
5959}
6060
6161impl Options <Arg > for Settings {
62- fn apply (& mut self , arg : Arg ) {
62+ fn apply (& mut self , arg : Arg ) -> Result <(), uutils_args :: Error > {
6363 match arg {
6464 Arg :: Force => self . force = true ,
6565 }
66+ Ok (())
6667 }
6768}
6869
@@ -100,11 +101,12 @@ struct Settings {
100101}
101102
102103impl Options <Arg > for Settings {
103- fn apply (& mut self , arg : Arg ) {
104+ fn apply (& mut self , arg : Arg ) -> Result <(), uutils_args :: Error > {
104105 match arg {
105106 Arg :: Force => self . force = true ,
106107 Arg :: NoForce => self . force = false ,
107108 }
109+ Ok (())
108110 }
109111}
110112
@@ -160,10 +162,11 @@ enum Arg {
160162# }
161163#
162164# impl Options <Arg > for Settings {
163- # fn apply (& mut self , arg : Arg ) {
165+ # fn apply (& mut self , arg : Arg ) -> Result <(), uutils_args :: Error > {
164166# match arg {
165167# Arg :: Name (name ) => self . name = name ,
166168# }
169+ # Ok (())
167170# }
168171# }
169172#
@@ -197,10 +200,11 @@ enum Arg {
197200# }
198201#
199202# impl Options <Arg > for Settings {
200- # fn apply (& mut self , arg : Arg ) {
203+ # fn apply (& mut self , arg : Arg ) -> Result <(), uutils_args :: Error > {
201204# match arg {
202205# Arg :: Name (name ) => self . name = name ,
203206# }
207+ # Ok (())
204208# }
205209# }
206210#
@@ -234,10 +238,11 @@ enum Arg {
234238# }
235239#
236240# impl Options <Arg > for Settings {
237- # fn apply (& mut self , arg : Arg ) {
241+ # fn apply (& mut self , arg : Arg ) -> Result <(), uutils_args :: Error > {
238242# match arg {
239243# Arg :: Force (b ) => self . force = b ,
240244# }
245+ # Ok (())
241246# }
242247# }
243248#
@@ -269,10 +274,11 @@ enum Arg {
269274# }
270275#
271276# impl Options <Arg > for Settings {
272- # fn apply (& mut self , arg : Arg ) {
277+ # fn apply (& mut self , arg : Arg ) -> Result <(), uutils_args :: Error > {
273278# match arg {
274279# Arg :: Sort (s ) => self . sort = s ,
275280# }
281+ # Ok (())
276282# }
277283# }
278284#
@@ -287,4 +293,4 @@ enum Arg {
287293[ Up] ( super )
288294[ Next] ( next )
289295
290- </div >
296+ </div >
0 commit comments