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
|
@ -879,12 +879,9 @@ impl Item for TerminalView {
|
|||
.or_else(|| {
|
||||
cx.update(|cx| {
|
||||
let strategy = TerminalSettings::get_global(cx).working_directory.clone();
|
||||
workspace
|
||||
.upgrade()
|
||||
.map(|workspace| {
|
||||
get_working_directory(workspace.read(cx), cx, strategy)
|
||||
})
|
||||
.flatten()
|
||||
workspace.upgrade().and_then(|workspace| {
|
||||
get_working_directory(workspace.read(cx), cx, strategy)
|
||||
})
|
||||
})
|
||||
.ok()
|
||||
.flatten()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue