chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -29,11 +29,10 @@ impl ProjectEnvironment {
cx: &mut AppContext,
) -> Model<Self> {
cx.new_model(|cx| {
cx.subscribe(worktree_store, |this: &mut Self, _, event, _| match event {
WorktreeStoreEvent::WorktreeRemoved(_, id) => {
cx.subscribe(worktree_store, |this: &mut Self, _, event, _| {
if let WorktreeStoreEvent::WorktreeRemoved(_, id) = event {
this.remove_worktree_environment(*id);
}
_ => {}
})
.detach();
@ -160,9 +159,9 @@ enum EnvironmentOrigin {
WorktreeShell,
}
impl Into<String> for EnvironmentOrigin {
fn into(self) -> String {
match self {
impl From<EnvironmentOrigin> for String {
fn from(val: EnvironmentOrigin) -> Self {
match val {
EnvironmentOrigin::Cli => "cli".into(),
EnvironmentOrigin::WorktreeShell => "worktree-shell".into(),
}