diff --git a/src/html/unit.rs b/src/html/unit.rs index 5096ad4f..af452598 100644 --- a/src/html/unit.rs +++ b/src/html/unit.rs @@ -213,12 +213,12 @@ impl FromStr for UnitValue { None => { let n: f32 = s .parse() - .map_err(|e| format!("Invalid number `{s}`: {e}"))?; + .map_err(|e| format!("invalid number `{s}`: {e}"))?; if n == 0.0 { Ok(UnitValue::Zero) } else { Err( - "Missing unit (expected one of cm,in,mm,pc,pt,px,em,rem,vh,vw, or %)" + "missing unit (expected one of cm,in,mm,pc,pt,px,em,rem,vh,vw, or %)" .to_string(), ) } @@ -230,11 +230,11 @@ impl FromStr for UnitValue { let parse_abs = |n_s: &str| -> Result { n_s.parse::() - .map_err(|e| format!("Invalid integer `{n_s}`: {e}")) + .map_err(|e| format!("invalid integer `{n_s}`: {e}")) }; let parse_rel = |n_s: &str| -> Result { n_s.parse::() - .map_err(|e| format!("Invalid float `{n_s}`: {e}")) + .map_err(|e| format!("invalid float `{n_s}`: {e}")) }; match u.to_ascii_lowercase().as_str() { @@ -253,7 +253,7 @@ impl FromStr for UnitValue { // Porcentaje como unidad. "%" => Ok(UnitValue::RelPct(parse_rel(n)?)), // Unidad desconocida. - _ => Err(format!("Unknown unit: `{u}`")), + _ => Err(format!("unknown unit: `{u}`")), } } } diff --git a/src/util.rs b/src/util.rs index de275efa..6ea4b70d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -192,7 +192,7 @@ pub fn resolve_absolute_dir>(path: P) -> io::Result { Ok(absolute_dir) } else { Err({ - let msg = format!("Path \"{}\" is not a directory", absolute_dir.display()); + let msg = format!("path \"{}\" is not a directory", absolute_dir.display()); trace::warn!(msg); io::Error::new(io::ErrorKind::InvalidInput, msg) }) diff --git a/tests/component_poweredby.rs b/tests/component_poweredby.rs index 7e5a062c..7dca895d 100644 --- a/tests/component_poweredby.rs +++ b/tests/component_poweredby.rs @@ -85,7 +85,7 @@ async fn poweredby_getter_reflects_internal_state() { // Y `new()` lo inicializa con año + nombre de app. let p1 = PoweredBy::new(); - let c1 = p1.copyright().expect("Expected copyright to exis"); + let c1 = p1.copyright().expect("Expected copyright to exist"); assert!(c1.contains(&Utc::now().format("%Y").to_string())); assert!(c1.contains(&global::SETTINGS.app.name)); }