clippy postbox cleanups

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-06-20 13:05:57 -07:00
parent 395ff57edf
commit bb6c68e05c
2 changed files with 7 additions and 8 deletions

View File

@@ -24,11 +24,11 @@ impl<'cache, 'url> ProfilePic<'cache, 'url> {
cache: &'cache mut ImageCache,
profile: &nostrdb::ProfileRecord<'url>,
) -> Option<Self> {
if let Some(url) = profile.record().profile().and_then(|p| p.picture()) {
Some(ProfilePic::new(cache, url))
} else {
None
}
profile
.record()
.profile()
.and_then(|p| p.picture())
.map(|url| ProfilePic::new(cache, url))
}
pub fn default_size() -> f32 {