chore: Beta Clippy suggestions (#6422)

This commit is contained in:
Hocuri
2025-01-11 17:58:38 +01:00
committed by GitHub
parent de63527d94
commit 5dc8788eab
4 changed files with 4 additions and 8 deletions

View File

@@ -1851,7 +1851,6 @@ impl Chat {
profile_image: self
.get_profile_image(context)
.await?
.map(Into::into)
.unwrap_or_else(std::path::PathBuf::new),
draft,
is_muted: self.is_muted(),
@@ -2565,7 +2564,6 @@ impl ChatIdBlocked {
},
)
.await
.map_err(Into::into)
}
/// Returns the chat for the 1:1 chat with this contact.

View File

@@ -61,10 +61,7 @@ macro_rules! progress {
impl Context {
/// Checks if the context is already configured.
pub async fn is_configured(&self) -> Result<bool> {
self.sql
.get_raw_config_bool("configured")
.await
.map_err(Into::into)
self.sql.get_raw_config_bool("configured").await
}
/// Configures this account with the currently set parameters.

View File

@@ -1111,7 +1111,9 @@ impl Message {
/// Updates message state from the vCard attachment.
pub(crate) async fn try_set_vcard(&mut self, context: &Context, path: &Path) -> Result<()> {
let vcard = fs::read(path).await.context("Could not read {path}")?;
let vcard = fs::read(path)
.await
.with_context(|| format!("Could not read {path:?}"))?;
if let Some(summary) = get_vcard_summary(&vcard) {
self.param.set(Param::Summary1, summary);
} else {

View File

@@ -417,7 +417,6 @@ async fn get_iroh_gossip_peers(ctx: &Context, msg_id: MsgId) -> Result<Vec<NodeA
))
})
.collect::<std::result::Result<Vec<_>, _>>()
.map_err(Into::into)
},
)
.await