aboutsummaryrefslogtreecommitdiff
path: root/examples3d-f64
diff options
context:
space:
mode:
Diffstat (limited to 'examples3d-f64')
-rw-r--r--examples3d-f64/all_examples3-f64.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples3d-f64/all_examples3-f64.rs b/examples3d-f64/all_examples3-f64.rs
index 4464d60..c381eec 100644
--- a/examples3d-f64/all_examples3-f64.rs
+++ b/examples3d-f64/all_examples3-f64.rs
@@ -43,15 +43,15 @@ 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![("(Debug) serialized", debug_serialized3::init_world)];
// 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,