Make the branch picker in the commit modal a popover (#25697)
Release Notes: - N/A --------- Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This commit is contained in:
parent
11838cf89e
commit
8ba7b349a5
20 changed files with 455 additions and 334 deletions
|
@ -40,6 +40,19 @@ pub trait FluentBuilder {
|
|||
}
|
||||
})
|
||||
}
|
||||
/// Conditionally unwrap and modify self with the given closure, if the given option is Some.
|
||||
fn when_none<T>(self, option: &Option<T>, then: impl FnOnce(Self) -> Self) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.map(|this| {
|
||||
if let Some(_) = option {
|
||||
this
|
||||
} else {
|
||||
then(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue