Skip to content

Commit

Permalink
chore: Beta Clippy suggestions (#6422)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hocuri authored Jan 11, 2025
1 parent de63527 commit 5dc8788
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -2565,7 +2564,6 @@ impl ChatIdBlocked {
},
)
.await
.map_err(Into::into)
}

/// Returns the chat for the 1:1 chat with this contact.
Expand Down
5 changes: 1 addition & 4 deletions src/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion src/peer_channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5dc8788

Please sign in to comment.