mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 13:49:52 -07:00
Fix newer Clippy warnings for 1.67.0 (#33)
This commit is contained in:
parent
fd72cf5c4e
commit
3629f15e0d
8 changed files with 33 additions and 28 deletions
|
@ -168,7 +168,7 @@ fn append_tags<'a>(tags: &'a Tags, spans: &mut Vec<Span<'a>>, style: Style) {
|
|||
spans.push(Span::styled("User Tag: ", style));
|
||||
spans.push(Span::styled(tag.as_ref(), style));
|
||||
},
|
||||
tag => spans.push(Span::styled(format!("{:?}", tag), style)),
|
||||
tag => spans.push(Span::styled(format!("{tag:?}"), style)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,7 @@ impl Window<IambInfo> for IambWindow {
|
|||
}
|
||||
|
||||
fn posn(index: usize, _: &mut ProgramStore) -> IambResult<Self> {
|
||||
let msg = format!("Cannot find indexed buffer (index = {})", index);
|
||||
let msg = format!("Cannot find indexed buffer (index = {index})");
|
||||
let err = UIError::Unimplemented(msg);
|
||||
|
||||
Err(err)
|
||||
|
@ -852,7 +852,7 @@ impl VerifyItem {
|
|||
let device = self.sasv1.other_device();
|
||||
|
||||
if let Some(display_name) = device.display_name() {
|
||||
format!("Device verification with {} ({})", display_name, state)
|
||||
format!("Device verification with {display_name} ({state})")
|
||||
} else {
|
||||
format!("Device verification with device {} ({})", device.device_id(), state)
|
||||
}
|
||||
|
@ -958,7 +958,7 @@ impl ListItem<IambInfo> for VerifyItem {
|
|||
lines.push(Spans::from(""));
|
||||
|
||||
for line in format_emojis(emoji).lines() {
|
||||
lines.push(Spans::from(format!(" {}", line)));
|
||||
lines.push(Spans::from(format!(" {line}")));
|
||||
}
|
||||
|
||||
lines.push(Spans::from(""));
|
||||
|
|
|
@ -383,7 +383,7 @@ impl ChatState {
|
|||
.map_err(IambError::from)?;
|
||||
|
||||
// Mock up the local echo message for the scrollback.
|
||||
let msg = TextMessageEventContent::plain(format!("[Attached File: {}]", name));
|
||||
let msg = TextMessageEventContent::plain(format!("[Attached File: {name}]"));
|
||||
let msg = MessageType::Text(msg);
|
||||
let msg = RoomMessageEventContent::new(msg);
|
||||
|
||||
|
|
|
@ -132,10 +132,7 @@ impl RoomState {
|
|||
None => format!("{:?}", store.application.get_room_title(self.id())),
|
||||
};
|
||||
|
||||
let mut invited = vec![Span::from(format!(
|
||||
"You have been invited to join {}",
|
||||
name
|
||||
))];
|
||||
let mut invited = vec![Span::from(format!("You have been invited to join {name}"))];
|
||||
|
||||
if let Ok(Some(inviter)) = &inviter {
|
||||
invited.push(Span::from(" by "));
|
||||
|
|
|
@ -615,7 +615,7 @@ impl EditorActions<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
|
|||
},
|
||||
|
||||
_ => {
|
||||
let msg = format!("Unknown editing target: {:?}", motion);
|
||||
let msg = format!("Unknown editing target: {motion:?}");
|
||||
let err = EditError::Unimplemented(msg);
|
||||
|
||||
return Err(err);
|
||||
|
@ -702,7 +702,7 @@ impl EditorActions<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
|
|||
},
|
||||
|
||||
_ => {
|
||||
let msg = format!("Unknown motion: {:?}", motion);
|
||||
let msg = format!("Unknown motion: {motion:?}");
|
||||
let err = EditError::Unimplemented(msg);
|
||||
|
||||
return Err(err);
|
||||
|
@ -790,7 +790,7 @@ impl EditorActions<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
|
|||
HistoryAction::Checkpoint => Ok(None),
|
||||
HistoryAction::Undo(_) => Err(EditError::Failure("Nothing to undo".into())),
|
||||
HistoryAction::Redo(_) => Err(EditError::Failure("Nothing to redo".into())),
|
||||
_ => Err(EditError::Unimplemented(format!("Unknown action: {:?}", act))),
|
||||
_ => Err(EditError::Unimplemented(format!("Unknown action: {act:?}"))),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -847,7 +847,7 @@ impl EditorActions<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
|
|||
|
||||
Ok(None)
|
||||
},
|
||||
_ => Err(EditError::Unimplemented(format!("Unknown action: {:?}", act))),
|
||||
_ => Err(EditError::Unimplemented(format!("Unknown action: {act:?}"))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -874,7 +874,7 @@ impl Editable<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
|
|||
Err(err)
|
||||
},
|
||||
|
||||
_ => Err(EditError::Unimplemented(format!("Unknown action: {:?}", act))),
|
||||
_ => Err(EditError::Unimplemented(format!("Unknown action: {act:?}"))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -973,7 +973,7 @@ impl Promptable<ProgramContext, ProgramStore, IambInfo> for ScrollbackState {
|
|||
return Err(err);
|
||||
},
|
||||
_ => {
|
||||
let msg = format!("Messages scrollback doesn't support {:?}", act);
|
||||
let msg = format!("Messages scrollback doesn't support {act:?}");
|
||||
let err = EditError::Unimplemented(msg);
|
||||
|
||||
return Err(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue