Enable clippy::map_flatten
(#8733)
This PR enables the [`clippy::map_flatten`](https://rust-lang.github.io/rust-clippy/master/index.html#/map_flatten) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
8bc35c33c5
commit
eaf2fbb21b
10 changed files with 13 additions and 26 deletions
|
@ -108,9 +108,7 @@ fn main() {
|
|||
let open_listener = listener.clone();
|
||||
app.on_open_urls(move |urls, _| open_listener.open_urls(&urls));
|
||||
app.on_reopen(move |cx| {
|
||||
if let Some(app_state) = AppState::try_global(cx)
|
||||
.map(|app_state| app_state.upgrade())
|
||||
.flatten()
|
||||
if let Some(app_state) = AppState::try_global(cx).and_then(|app_state| app_state.upgrade())
|
||||
{
|
||||
workspace::open_new(&app_state, cx, |workspace, cx| {
|
||||
Editor::new_file(workspace, &Default::default(), cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue