Skip to content

Commit 5dc8788

Browse files
authored
chore: Beta Clippy suggestions (#6422)
1 parent de63527 commit 5dc8788

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

src/chat.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,6 @@ impl Chat {
18511851
profile_image: self
18521852
.get_profile_image(context)
18531853
.await?
1854-
.map(Into::into)
18551854
.unwrap_or_else(std::path::PathBuf::new),
18561855
draft,
18571856
is_muted: self.is_muted(),
@@ -2565,7 +2564,6 @@ impl ChatIdBlocked {
25652564
},
25662565
)
25672566
.await
2568-
.map_err(Into::into)
25692567
}
25702568

25712569
/// Returns the chat for the 1:1 chat with this contact.

src/configure.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ macro_rules! progress {
6161
impl Context {
6262
/// Checks if the context is already configured.
6363
pub async fn is_configured(&self) -> Result<bool> {
64-
self.sql
65-
.get_raw_config_bool("configured")
66-
.await
67-
.map_err(Into::into)
64+
self.sql.get_raw_config_bool("configured").await
6865
}
6966

7067
/// Configures this account with the currently set parameters.

src/message.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,9 @@ impl Message {
11111111

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

src/peer_channels.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ async fn get_iroh_gossip_peers(ctx: &Context, msg_id: MsgId) -> Result<Vec<NodeA
417417
))
418418
})
419419
.collect::<std::result::Result<Vec<_>, _>>()
420-
.map_err(Into::into)
421420
},
422421
)
423422
.await

0 commit comments

Comments
 (0)