Clippy fixes

This commit is contained in:
Marc-André Lureau 2021-03-08 01:02:59 +04:00
parent 124d893395
commit b787a2c0bc
3 changed files with 5 additions and 7 deletions

View File

@ -98,7 +98,7 @@ mod imp {
widget.make_current();
if let Err(e) = unsafe { self.realize_gl() } {
let e = glib::Error::new(AppError::GL, &e.to_string());
let e = glib::Error::new(AppError::GL, &e);
widget.set_error(Some(&e));
}
}

View File

@ -17,12 +17,10 @@ fn pcminfo_as_caps(info: &PCMInfo) -> String {
"{}{}{}",
if info.is_float {
"F"
} else if info.is_signed {
"S"
} else {
if info.is_signed {
"S"
} else {
"U"
}
"U"
},
info.bits,
if info.be { "BE" } else { "LE" }

View File

@ -15,7 +15,7 @@ fn main() {
fn try_main() -> Result<(), DynError> {
let task = env::args().nth(1);
match task.as_ref().map(|it| it.as_str()) {
match task.as_deref() {
Some("codegen") => codegen()?,
_ => print_help(),
}