fix most of the clippy linter warnings

This commit is contained in:
Henrik Friedrichsen
2019-04-23 22:28:05 +02:00
parent fe3470479c
commit 18c2f6466a
6 changed files with 30 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ pub fn create_credentials(path: &Path) -> Result<RespotCredentials, String> {
}));
s.quit();
})
.button("Quit", |s| s.quit());
.button("Quit", Cursive::quit);
s.pop_layer();
s.add_layer(login_view);
})
@@ -64,7 +64,7 @@ pub fn create_credentials(path: &Path) -> Result<RespotCredentials, String> {
// not a dialog to let people copy & paste the URL
let url_notice = TextView::new(format!("Browse to {}", &urls["login_url"]));
let controls = Button::new("Quit", |s| s.quit());
let controls = Button::new("Quit", Cursive::quit);
let login_view = LinearLayout::new(cursive::direction::Orientation::Vertical)
.child(url_notice)
@@ -75,7 +75,7 @@ pub fn create_credentials(path: &Path) -> Result<RespotCredentials, String> {
s.pop_layer();
s.add_layer(login_view)
})
.button("Quit", |s| s.quit());
.button("Quit", Cursive::quit);
login_cursive.add_layer(info_view);
login_cursive.run();