chore: clippy fix

This commit is contained in:
2024-10-18 13:11:21 +01:00
parent b4a6991007
commit e6b606e8fb
18 changed files with 47 additions and 72 deletions

View File

@ -84,8 +84,7 @@ impl<'a> StreamInfo for Note<'a> {
fn viewers(&self) -> Option<u32> {
if let Some(s) = self.get_tag_value("current_participants") {
s.variant().str()
.map_or(None, |v| Some(v.parse::<u32>().unwrap_or(0)))
s.variant().str().map(|v| v.parse::<u32>().unwrap_or(0))
} else {
None
}