File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
anathema-value-resolver/src/functions Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ impl FunctionTable {
5959 inner. insert ( "to_lower" . into ( ) , Function :: from ( string:: to_lower) ) ;
6060 inner. insert ( "truncate" . into ( ) , Function :: from ( string:: truncate) ) ;
6161 inner. insert ( "to_str" . into ( ) , Function :: from ( string:: to_str) ) ;
62- inner. insert ( "padd " . into ( ) , Function :: from ( string:: padd ) ) ;
62+ inner. insert ( "pad " . into ( ) , Function :: from ( string:: pad ) ) ;
6363 inner. insert ( "width" . into ( ) , Function :: from ( string:: width) ) ;
6464 inner. insert ( "to_int" . into ( ) , Function :: from ( number:: to_int) ) ;
6565 inner. insert ( "to_float" . into ( ) , Function :: from ( number:: to_float) ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ pub(super) fn truncate<'bp>(args: &[ValueKind<'bp>]) -> ValueKind<'bp> {
7373 ValueKind :: Str ( buffer. into ( ) )
7474}
7575
76- pub ( super ) fn padd < ' bp > ( args : & [ ValueKind < ' bp > ] ) -> ValueKind < ' bp > {
76+ pub ( super ) fn pad < ' bp > ( args : & [ ValueKind < ' bp > ] ) -> ValueKind < ' bp > {
7777 if args. len ( ) != 2 {
7878 return ValueKind :: Null ;
7979 }
@@ -181,24 +181,24 @@ mod test {
181181 }
182182
183183 #[ test]
184- fn padd_string ( ) {
184+ fn pad_string ( ) {
185185 let val = value ( "hi" ) ;
186- let val = padd ( & [ val, value ( 3 ) ] ) ;
186+ let val = pad ( & [ val, value ( 3 ) ] ) ;
187187 assert_eq ! ( val, value( "hi " ) ) ;
188188
189189 let val = value ( "bye" ) ;
190- let val = padd ( & [ val, value ( 3 ) ] ) ;
190+ let val = pad ( & [ val, value ( 3 ) ] ) ;
191191 assert_eq ! ( val, value( "bye" ) ) ;
192192
193193 let val = value ( "hello" ) ;
194- let val = padd ( & [ val, value ( 3 ) ] ) ;
194+ let val = pad ( & [ val, value ( 3 ) ] ) ;
195195 assert_eq ! ( val, value( "hello" ) ) ;
196196 }
197197
198198 #[ test]
199- fn padd_non_string ( ) {
199+ fn pad_non_string ( ) {
200200 let val = value ( 1 ) ;
201- let val = padd ( & [ val, value ( 3 ) ] ) ;
201+ let val = pad ( & [ val, value ( 3 ) ] ) ;
202202 assert_eq ! ( val, value( "1 " ) ) ;
203203 }
204204
You can’t perform that action at this time.
0 commit comments