File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -251,8 +251,8 @@ impl FileRevlogPopup {
251
251
} ;
252
252
let revisions = self . get_max_selection ( ) ;
253
253
254
- self . open_request . as_ref ( ) . map_or (
255
- "<no history available>" . into ( ) ,
254
+ self . open_request . as_ref ( ) . map_or_else (
255
+ || "<no history available>" . into ( ) ,
256
256
|open_request| {
257
257
strings:: file_log_title (
258
258
& open_request. file_path ,
Original file line number Diff line number Diff line change @@ -195,8 +195,8 @@ impl PushPopup {
195
195
pub fn get_progress (
196
196
progress : Option < & RemoteProgress > ,
197
197
) -> ( String , u8 ) {
198
- progress. as_ref ( ) . map_or (
199
- ( strings:: PUSH_POPUP_PROGRESS_NONE . into ( ) , 0 ) ,
198
+ progress. as_ref ( ) . map_or_else (
199
+ || ( strings:: PUSH_POPUP_PROGRESS_NONE . into ( ) , 0 ) ,
200
200
|progress| {
201
201
(
202
202
Self :: progress_state_name ( & progress. state ) ,
Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ impl PushTagsPopup {
131
131
pub fn get_progress (
132
132
progress : Option < & PushTagsProgress > ,
133
133
) -> ( String , u8 ) {
134
- progress. as_ref ( ) . map_or (
135
- ( strings:: PUSH_POPUP_PROGRESS_NONE . into ( ) , 0 ) ,
134
+ progress. as_ref ( ) . map_or_else (
135
+ || ( strings:: PUSH_POPUP_PROGRESS_NONE . into ( ) , 0 ) ,
136
136
|progress| {
137
137
(
138
138
Self :: progress_state_name ( progress) ,
You can’t perform that action at this time.
0 commit comments