clippy optimizations

This commit is contained in:
euzu
2025-05-16 14:11:33 +02:00
parent c5939e26c7
commit 0aa26466a3
17 changed files with 60 additions and 67 deletions
+2 -2
View File
@@ -520,7 +520,7 @@ mod tests {
epg_smart_cfg.enabled = true;
epg_smart_cfg.name_prefix = EpgNamePrefix::Suffix(".".to_string());
let _ = epg_smart_cfg.prepare();
println!("{:?}", epg_smart_cfg);
println!("{epg_smart_cfg:?}");
assert_eq!("supersport6.ru", normalize_channel_name("RU: SUPERSPORT 6 ᴿᴬᵂ", &epg_smart_cfg));
assert_eq!("odisea.sat", normalize_channel_name("SAT: ODISEA ᴿᴬᵂ", &epg_smart_cfg));
assert_eq!("odisea.4k", normalize_channel_name("4K: ODISEA ᵁᴴᴰ ³⁸⁴⁰ᴾ", &epg_smart_cfg));
@@ -549,7 +549,7 @@ mod tests {
epg_smart_cfg.enabled = true;
epg_smart_cfg.name_prefix = EpgNamePrefix::Suffix(".".to_string());
let _ = epg_smart_cfg.prepare();
println!("{:?}", epg_smart_cfg);
println!("{epg_smart_cfg:?}");
// assert_eq!("supersport6.ru", metaphone.encode(&normalize_channel_name("RU: SUPERSPORT 6 ᴿᴬᵂ", &epg_normalize_cfg)));
// assert_eq!("odisea.sat", metaphone.encode(&normalize_channel_name("SAT: ODISEA ᴿᴬᵂ", &epg_normalize_cfg)));
// assert_eq!("odisea", metaphone.encode(&normalize_channel_name("4K: ODISEA ᵁᴴᴰ ³⁸⁴⁰ᴾ", &epg_normalize_cfg)));
+2 -2
View File
@@ -147,7 +147,7 @@ mod tests {
let mut channels: Vec<PlaylistItem> = vec![
("D", "HD"), ("A", "FHD"), ("Z", "HD"), ("K", "HD"), ("B", "HD"), ("A", "HD"),
("K", "UHD"), ("C", "HD"), ("L", "FHD"), ("R", "UHD"), ("T", "SD"), ("A", "FHD"),
].into_iter().map(|(name, quality)| PlaylistItem { header: PlaylistItemHeader { title: format!("Chanel {name} [{quality}]"), ..Default::default() } }).collect::<Vec<PlaylistItem>>().into();
].into_iter().map(|(name, quality)| PlaylistItem { header: PlaylistItemHeader { title: format!("Chanel {name} [{quality}]"), ..Default::default() } }).collect::<Vec<PlaylistItem>>();
let channel_sort = ConfigSortChannel {
field: ItemField::Caption,
@@ -195,7 +195,7 @@ mod tests {
"US| East d",
"US| West e",
"US| West f",
].into_iter().map(|name| PlaylistItem { header: PlaylistItemHeader { title: name.to_string(), ..Default::default() } }).collect::<Vec<PlaylistItem>>().into();
].into_iter().map(|name| PlaylistItem { header: PlaylistItemHeader { title: name.to_string(), ..Default::default() } }).collect::<Vec<PlaylistItem>>();
let channel_sort = ConfigSortChannel {
field: ItemField::Caption,