Fix clippy errors on nightly (#2688)

This commit is contained in:
Christoph Rüßler 2025-08-05 19:02:26 +02:00 committed by GitHub
parent 6685f9adb3
commit 57d7d00701
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -251,8 +251,8 @@ impl FileRevlogPopup {
};
let revisions = self.get_max_selection();
self.open_request.as_ref().map_or(
"<no history available>".into(),
self.open_request.as_ref().map_or_else(
|| "<no history available>".into(),
|open_request| {
strings::file_log_title(
&open_request.file_path,

View file

@ -195,8 +195,8 @@ impl PushPopup {
pub fn get_progress(
progress: Option<&RemoteProgress>,
) -> (String, u8) {
progress.as_ref().map_or(
(strings::PUSH_POPUP_PROGRESS_NONE.into(), 0),
progress.as_ref().map_or_else(
|| (strings::PUSH_POPUP_PROGRESS_NONE.into(), 0),
|progress| {
(
Self::progress_state_name(&progress.state),

View file

@ -131,8 +131,8 @@ impl PushTagsPopup {
pub fn get_progress(
progress: Option<&PushTagsProgress>,
) -> (String, u8) {
progress.as_ref().map_or(
(strings::PUSH_POPUP_PROGRESS_NONE.into(), 0),
progress.as_ref().map_or_else(
|| (strings::PUSH_POPUP_PROGRESS_NONE.into(), 0),
|progress| {
(
Self::progress_state_name(progress),