diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-01-27 16:49:53 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-01-27 17:13:08 +0100 |
| commit | da92e5c2837b27433286cf0dd9d887fd44dda254 (patch) | |
| tree | 00428ce290288f5c64e53dee13d88ffdde4df0ca /examples3d/all_examples3.rs | |
| parent | aef873f20e7a1ee66b9d4c066884fa794048587b (diff) | |
| download | rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.gz rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.bz2 rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.zip | |
Fix clippy and enable clippy on CI
Diffstat (limited to 'examples3d/all_examples3.rs')
| -rw-r--r-- | examples3d/all_examples3.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples3d/all_examples3.rs b/examples3d/all_examples3.rs index 1bc8419..bac826e 100644 --- a/examples3d/all_examples3.rs +++ b/examples3d/all_examples3.rs @@ -86,8 +86,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![ @@ -157,7 +157,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, |
