@@ -594,7 +594,7 @@ mod test {
594
594
assert ! ( res. is_ok( ) ,
595
595
"Op {} failed with 1 stack entry: {}" ,
596
596
cap,
597
- res. err ( ) . unwrap ( ) ) ;
597
+ res. unwrap_err ( ) ) ;
598
598
}
599
599
let caps = [ "%+" , "%-" , "%*" , "%/" , "%m" , "%&" , "%|" , "%A" , "%O" ] ;
600
600
for & cap in caps. iter ( ) {
@@ -610,7 +610,7 @@ mod test {
610
610
assert ! ( res. is_ok( ) ,
611
611
"Binop {} failed with 2 stack entries: {}" ,
612
612
cap,
613
- res. err ( ) . unwrap ( ) ) ;
613
+ res. unwrap_err ( ) ) ;
614
614
}
615
615
}
616
616
@@ -625,15 +625,15 @@ mod test {
625
625
for & ( op, bs) in v. iter ( ) {
626
626
let s = format ! ( "%{{1}}%{{2}}%{}%d" , op) ;
627
627
let res = expand ( s. as_bytes ( ) , & [ ] , & mut Variables :: new ( ) ) ;
628
- assert ! ( res. is_ok( ) , res. err ( ) . unwrap ( ) ) ;
628
+ assert ! ( res. is_ok( ) , res. unwrap_err ( ) ) ;
629
629
assert_eq ! ( res. unwrap( ) , vec![ b'0' + bs[ 0 ] ] ) ;
630
630
let s = format ! ( "%{{1}}%{{1}}%{}%d" , op) ;
631
631
let res = expand ( s. as_bytes ( ) , & [ ] , & mut Variables :: new ( ) ) ;
632
- assert ! ( res. is_ok( ) , res. err ( ) . unwrap ( ) ) ;
632
+ assert ! ( res. is_ok( ) , res. unwrap_err ( ) ) ;
633
633
assert_eq ! ( res. unwrap( ) , vec![ b'0' + bs[ 1 ] ] ) ;
634
634
let s = format ! ( "%{{2}}%{{1}}%{}%d" , op) ;
635
635
let res = expand ( s. as_bytes ( ) , & [ ] , & mut Variables :: new ( ) ) ;
636
- assert ! ( res. is_ok( ) , res. err ( ) . unwrap ( ) ) ;
636
+ assert ! ( res. is_ok( ) , res. unwrap_err ( ) ) ;
637
637
assert_eq ! ( res. unwrap( ) , vec![ b'0' + bs[ 2 ] ] ) ;
638
638
}
639
639
}
@@ -643,13 +643,13 @@ mod test {
643
643
let mut vars = Variables :: new ( ) ;
644
644
let s = b"\\ E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m" ;
645
645
let res = expand ( s, & [ Number ( 1 ) ] , & mut vars) ;
646
- assert ! ( res. is_ok( ) , res. err ( ) . unwrap ( ) ) ;
646
+ assert ! ( res. is_ok( ) , res. unwrap_err ( ) ) ;
647
647
assert_eq ! ( res. unwrap( ) , "\\ E[31m" . bytes( ) . collect:: <Vec <_>>( ) ) ;
648
648
let res = expand ( s, & [ Number ( 8 ) ] , & mut vars) ;
649
- assert ! ( res. is_ok( ) , res. err ( ) . unwrap ( ) ) ;
649
+ assert ! ( res. is_ok( ) , res. unwrap_err ( ) ) ;
650
650
assert_eq ! ( res. unwrap( ) , "\\ E[90m" . bytes( ) . collect:: <Vec <_>>( ) ) ;
651
651
let res = expand ( s, & [ Number ( 42 ) ] , & mut vars) ;
652
- assert ! ( res. is_ok( ) , res. err ( ) . unwrap ( ) ) ;
652
+ assert ! ( res. is_ok( ) , res. unwrap_err ( ) ) ;
653
653
assert_eq ! ( res. unwrap( ) , "\\ E[38;5;42m" . bytes( ) . collect:: <Vec <_>>( ) ) ;
654
654
}
655
655
0 commit comments