Enable clippy::option_map_unit_fn
(#8751)
This PR enables the [`clippy::option_map_unit_fn`](https://rust-lang.github.io/rust-clippy/master/index.html#/option_map_unit_fn) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
d19957b705
commit
ea68f86476
8 changed files with 75 additions and 55 deletions
|
@ -119,7 +119,9 @@ impl Render for CopilotButton {
|
|||
|
||||
impl CopilotButton {
|
||||
pub fn new(fs: Arc<dyn Fs>, cx: &mut ViewContext<Self>) -> Self {
|
||||
Copilot::global(cx).map(|copilot| cx.observe(&copilot, |_, _, cx| cx.notify()).detach());
|
||||
if let Some(copilot) = Copilot::global(cx) {
|
||||
cx.observe(&copilot, |_, _, cx| cx.notify()).detach()
|
||||
}
|
||||
|
||||
cx.observe_global::<SettingsStore>(move |_, cx| cx.notify())
|
||||
.detach();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue