Some refactorings

- HdHomerun
- WebUI GeoIP
- Playlist Updates
...
This commit is contained in:
euzu
2025-10-28 19:52:46 +01:00
parent 68cfbe9cec
commit cd76891ce4
25 changed files with 148 additions and 105 deletions
+2 -8
View File
@@ -127,14 +127,8 @@ pub fn humanize_snake_case(s: &str) -> String {
result
}
pub trait StringExt {
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str;
}
impl StringExt for String {
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str {
if a.len() >= b.len() { a } else { b }
}
pub fn longest<'a>(a: &'a str, b: &'a str) -> &'a str {
if a.len() >= b.len() { a } else { b }
}
#[cfg(test)]