mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
Fix clippy
This commit is contained in:
parent
52d3c29244
commit
b9100fbd44
@ -914,10 +914,8 @@ pub struct Command {
|
||||
|
||||
fn quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
|
||||
// last view and we have unsaved changes
|
||||
if editor.tree.views().count() == 1 {
|
||||
if _buffers_remaining(editor) {
|
||||
return;
|
||||
}
|
||||
if editor.tree.views().count() == 1 && _buffers_remaining(editor) {
|
||||
return;
|
||||
}
|
||||
editor.close(editor.view().id, /* close_buffer */ false);
|
||||
}
|
||||
@ -1056,10 +1054,8 @@ fn _write_all(editor: &mut Editor, args: &[&str], event: PromptEvent, quit: bool
|
||||
editor.set_error(errors);
|
||||
|
||||
if quit {
|
||||
if !force {
|
||||
if _buffers_remaining(editor) {
|
||||
return;
|
||||
}
|
||||
if !force && _buffers_remaining(editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// close all views
|
||||
@ -1083,10 +1079,8 @@ fn force_write_all_quit(editor: &mut Editor, args: &[&str], event: PromptEvent)
|
||||
}
|
||||
|
||||
fn _quit_all(editor: &mut Editor, args: &[&str], event: PromptEvent, force: bool) {
|
||||
if !force {
|
||||
if _buffers_remaining(editor) {
|
||||
return;
|
||||
}
|
||||
if !force && _buffers_remaining(editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// close all views
|
||||
|
Loading…
Reference in New Issue
Block a user