File tree 2 files changed +5
-7
lines changed 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ impl Delegate {
35
35
match change. event {
36
36
Addition { entry_mode, id } => {
37
37
if let Some ( obj) = entry_data ( entry_mode, id) ? {
38
- for line in ( & obj. data ) . lines ( ) {
38
+ for line in obj. data . lines ( ) {
39
39
let version = version_from_json_line ( line, change. location ) ?;
40
40
self . changes . push ( if version. yanked {
41
41
Change :: Yanked ( version)
@@ -140,7 +140,7 @@ impl Delegate {
140
140
} ,
141
141
) ;
142
142
if let Some ( err) = err {
143
- return Err ( err. into ( ) ) ;
143
+ return Err ( err) ;
144
144
}
145
145
}
146
146
}
Original file line number Diff line number Diff line change @@ -97,14 +97,12 @@ impl Index {
97
97
. ok ( )
98
98
. and_then ( |head| {
99
99
head. into_remote ( git:: remote:: Direction :: Fetch )
100
- . map ( |r| r. ok ( ) )
101
- . flatten ( )
100
+ . and_then ( |r| r. ok ( ) )
102
101
} )
103
102
. or_else ( || {
104
103
self . repo
105
104
. find_default_remote ( git:: remote:: Direction :: Fetch )
106
- . map ( |r| r. ok ( ) )
107
- . flatten ( )
105
+ . and_then ( |r| r. ok ( ) )
108
106
} )
109
107
} )
110
108
} )
@@ -146,7 +144,7 @@ impl Index {
146
144
. iter ( )
147
145
. find_map ( |m| match & m. remote {
148
146
git:: remote:: fetch:: Source :: Ref ( r) => ( r. unpack ( ) . 0 == branch_name)
149
- . then ( || m. local . as_ref ( ) )
147
+ . then_some ( m. local . as_ref ( ) )
150
148
. flatten ( ) ,
151
149
_ => None ,
152
150
} )
You can’t perform that action at this time.
0 commit comments