@@ -26,8 +26,8 @@ pub struct ResolvedOpArg {
2626
2727pub trait ResolvedOpArgExt : Sized {
2828 fn expect_type ( self , expected_type : & ValueType ) -> Result < Self > ;
29- fn value < ' a > ( & self , args : & ' a Vec < value:: Value > ) -> Result < & ' a value:: Value > ;
30- fn take_value ( & self , args : & mut Vec < value:: Value > ) -> Result < value:: Value > ;
29+ fn value < ' a > ( & self , args : & ' a [ value:: Value ] ) -> Result < & ' a value:: Value > ;
30+ fn take_value ( & self , args : & mut [ value:: Value ] ) -> Result < value:: Value > ;
3131}
3232
3333impl ResolvedOpArgExt for ResolvedOpArg {
@@ -43,7 +43,7 @@ impl ResolvedOpArgExt for ResolvedOpArg {
4343 Ok ( self )
4444 }
4545
46- fn value < ' a > ( & self , args : & ' a Vec < value:: Value > ) -> Result < & ' a value:: Value > {
46+ fn value < ' a > ( & self , args : & ' a [ value:: Value ] ) -> Result < & ' a value:: Value > {
4747 if self . idx >= args. len ( ) {
4848 api_bail ! (
4949 "Two few arguments, {} provided, expected at least {} for `{}`" ,
@@ -55,7 +55,7 @@ impl ResolvedOpArgExt for ResolvedOpArg {
5555 Ok ( & args[ self . idx ] )
5656 }
5757
58- fn take_value ( & self , args : & mut Vec < value:: Value > ) -> Result < value:: Value > {
58+ fn take_value ( & self , args : & mut [ value:: Value ] ) -> Result < value:: Value > {
5959 if self . idx >= args. len ( ) {
6060 api_bail ! (
6161 "Two few arguments, {} provided, expected at least {} for `{}`" ,
@@ -73,15 +73,15 @@ impl ResolvedOpArgExt for Option<ResolvedOpArg> {
7373 self . map ( |arg| arg. expect_type ( expected_type) ) . transpose ( )
7474 }
7575
76- fn value < ' a > ( & self , args : & ' a Vec < value:: Value > ) -> Result < & ' a value:: Value > {
76+ fn value < ' a > ( & self , args : & ' a [ value:: Value ] ) -> Result < & ' a value:: Value > {
7777 Ok ( self
7878 . as_ref ( )
7979 . map ( |arg| arg. value ( args) )
8080 . transpose ( ) ?
8181 . unwrap_or ( & value:: Value :: Null ) )
8282 }
8383
84- fn take_value ( & self , args : & mut Vec < value:: Value > ) -> Result < value:: Value > {
84+ fn take_value ( & self , args : & mut [ value:: Value ] ) -> Result < value:: Value > {
8585 Ok ( self
8686 . as_ref ( )
8787 . map ( |arg| arg. take_value ( args) )
0 commit comments