clear unwrap (#8605)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-07-04 20:18:53 +08:00
committed by GitHub
parent 94addb162b
commit 86ff768241
11 changed files with 54 additions and 42 deletions

View File

@@ -360,7 +360,12 @@ impl Server {
self.services
.keys()
.filter(|k| {
Self::is_video_service_name(k) && self.services.get(*k).unwrap().is_subed(conn_id)
Self::is_video_service_name(k)
&& self
.services
.get(*k)
.map(|s| s.is_subed(conn_id))
.unwrap_or(false)
})
.count()
}