Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed Aug 7, 2024
1 parent 103206f commit 2639cc9
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions lapce-app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ impl AppData {
} else {
config
};
let mut workspace = LapceWorkspace::default();
workspace.path = folder;
let workspace = LapceWorkspace {
path: folder,
..Default::default()
};
let app_data = self.clone();
floem::new_window(
move |window_id| {
Expand Down Expand Up @@ -601,20 +603,20 @@ impl AppData {
app_command.send(AppCommand::NewWindow {
folder: Some(file.path.clone()),
});
} else {
if let Some(win_tab_data) = window_data.active_window_tab() {
win_tab_data.common.internal_command.send(
InternalCommand::GoToLocation {
location: EditorLocation {
path: file.path.clone(),
position: None,
scroll_offset: None,
ignore_unconfirmed: false,
same_editor_tab: false,
},
} else if let Some(win_tab_data) =
window_data.active_window_tab()
{
win_tab_data.common.internal_command.send(
InternalCommand::GoToLocation {
location: EditorLocation {
path: file.path.clone(),
position: None,
scroll_offset: None,
ignore_unconfirmed: false,
same_editor_tab: false,
},
)
}
},
)
}
}
})
Expand Down

0 comments on commit 2639cc9

Please sign in to comment.