File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ fn main() {
95
95
if i > 0 { print ! ( "\t " ) ; }
96
96
if columns[ i] . value . is_empty ( ) { print ! ( "\\ N" ) ; }
97
97
else {
98
- if columns[ i] . search != None && columns[ i] . replace != None {
99
- columns[ i] . value = columns[ i] . value . replace ( columns [ i ] . search . unwrap ( ) , columns [ i ] . replace . unwrap ( ) ) ;
98
+ if let ( Some ( s ) , Some ( r ) ) = ( columns[ i] . search , columns[ i] . replace ) {
99
+ columns[ i] . value = columns[ i] . value . replace ( s , r ) ;
100
100
}
101
101
print ! ( "{}" , columns[ i] . value) ;
102
102
columns[ i] . value . clear ( ) ;
@@ -111,8 +111,8 @@ fn main() {
111
111
for i in 0 ..columns. len ( ) {
112
112
if path == columns[ i] . path {
113
113
raw = false ;
114
- if columns[ i] . search != None && columns[ i] . replace != None {
115
- rawstr = rawstr. replace ( columns [ i ] . search . unwrap ( ) , columns [ i ] . replace . unwrap ( ) ) ;
114
+ if let ( Some ( s ) , Some ( r ) ) = ( columns[ i] . search , columns[ i] . replace ) {
115
+ rawstr = rawstr. replace ( s , r ) ;
116
116
}
117
117
columns[ i] . value . push_str ( & rawstr) ;
118
118
rawstr. clear ( ) ;
You can’t perform that action at this time.
0 commit comments