Fix clippy and enable clippy on CI

This commit is contained in:
Sébastien Crozet
2024-01-27 16:49:53 +01:00
committed by Sébastien Crozet
parent aef873f20e
commit da92e5c283
81 changed files with 420 additions and 468 deletions

View File

@@ -46,8 +46,8 @@ fn demo_name_from_url() -> Option<String> {
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(start))]
pub fn main() {
let demo = demo_name_from_command_line()
.or_else(|| demo_name_from_url())
.unwrap_or(String::new())
.or_else(demo_name_from_url)
.unwrap_or_default()
.to_camel_case();
let mut builders: Vec<(_, fn(&mut Testbed))> = vec![
@@ -66,7 +66,7 @@ pub fn main() {
];
// Lexicographic sort, with stress tests moved at the end of the list.
builders.sort_by(|a, b| match (a.0.starts_with("("), b.0.starts_with("(")) {
builders.sort_by(|a, b| match (a.0.starts_with('('), b.0.starts_with(')')) {
(true, true) | (false, false) => a.0.cmp(b.0),
(true, false) => Ordering::Greater,
(false, true) => Ordering::Less,