mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
chore: Beta Clippy suggestions (#6422)
This commit is contained in:
@@ -1851,7 +1851,6 @@ impl Chat {
|
|||||||
profile_image: self
|
profile_image: self
|
||||||
.get_profile_image(context)
|
.get_profile_image(context)
|
||||||
.await?
|
.await?
|
||||||
.map(Into::into)
|
|
||||||
.unwrap_or_else(std::path::PathBuf::new),
|
.unwrap_or_else(std::path::PathBuf::new),
|
||||||
draft,
|
draft,
|
||||||
is_muted: self.is_muted(),
|
is_muted: self.is_muted(),
|
||||||
@@ -2565,7 +2564,6 @@ impl ChatIdBlocked {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.map_err(Into::into)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the chat for the 1:1 chat with this contact.
|
/// Returns the chat for the 1:1 chat with this contact.
|
||||||
|
|||||||
@@ -61,10 +61,7 @@ macro_rules! progress {
|
|||||||
impl Context {
|
impl Context {
|
||||||
/// Checks if the context is already configured.
|
/// Checks if the context is already configured.
|
||||||
pub async fn is_configured(&self) -> Result<bool> {
|
pub async fn is_configured(&self) -> Result<bool> {
|
||||||
self.sql
|
self.sql.get_raw_config_bool("configured").await
|
||||||
.get_raw_config_bool("configured")
|
|
||||||
.await
|
|
||||||
.map_err(Into::into)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Configures this account with the currently set parameters.
|
/// Configures this account with the currently set parameters.
|
||||||
|
|||||||
@@ -1111,7 +1111,9 @@ impl Message {
|
|||||||
|
|
||||||
/// Updates message state from the vCard attachment.
|
/// Updates message state from the vCard attachment.
|
||||||
pub(crate) async fn try_set_vcard(&mut self, context: &Context, path: &Path) -> Result<()> {
|
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) {
|
if let Some(summary) = get_vcard_summary(&vcard) {
|
||||||
self.param.set(Param::Summary1, summary);
|
self.param.set(Param::Summary1, summary);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -417,7 +417,6 @@ async fn get_iroh_gossip_peers(ctx: &Context, msg_id: MsgId) -> Result<Vec<NodeA
|
|||||||
))
|
))
|
||||||
})
|
})
|
||||||
.collect::<std::result::Result<Vec<_>, _>>()
|
.collect::<std::result::Result<Vec<_>, _>>()
|
||||||
.map_err(Into::into)
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user