Fix or ignore 2024 edition migration lints
This commit is contained in:
parent
bd43fe060b
commit
f45e66f572
9 changed files with 15 additions and 11 deletions
|
|
@ -68,7 +68,11 @@ rust.unused_lifetimes = "warn"
|
|||
rust.unused_qualifications = "warn"
|
||||
# Clippy
|
||||
clippy.use_self = "warn"
|
||||
|
||||
# Migrating to the 2024 edition
|
||||
rust.rust_2024_compatibility = "warn"
|
||||
rust.edition_2024_expr_fragment_specifier = { level = "allow", priority = 1 }
|
||||
rust.if_let_rescope = { level = "allow", priority = 1 }
|
||||
rust.tail_expr_drop_order = { level = "allow", priority = 1 }
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ where
|
|||
|
||||
pub fn into_visible_blocks(
|
||||
self,
|
||||
) -> impl Iterator<Item = (Range<i32>, Block<TreeBlockId<M::Id>>)> {
|
||||
) -> impl Iterator<Item = (Range<i32>, Block<TreeBlockId<M::Id>>)> + use<M, S> {
|
||||
let area = renderer::visible_area(&self);
|
||||
self.blocks
|
||||
.into_iter()
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ impl LoggedOut {
|
|||
pub struct LoggedIn(PersonalAccountView);
|
||||
|
||||
impl LoggedIn {
|
||||
fn widget(&self) -> impl Widget<UiError> {
|
||||
fn widget(&self) -> impl Widget<UiError> + use<> {
|
||||
let bold = Style::new().bold();
|
||||
Join5::vertical(
|
||||
Text::new(("Logged in", bold.green())).segment(),
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ fn message_lines(mut text: Styled, msg: &Message) -> Styled {
|
|||
text
|
||||
}
|
||||
|
||||
pub fn session_widget(session: &SessionInfo) -> impl Widget<UiError> {
|
||||
pub fn session_widget(session: &SessionInfo) -> impl Widget<UiError> + use<> {
|
||||
let heading_style = Style::new().bold();
|
||||
|
||||
let text = match session {
|
||||
|
|
@ -108,7 +108,7 @@ pub fn session_widget(session: &SessionInfo) -> impl Widget<UiError> {
|
|||
Popup::new(Text::new(text), "Inspect session")
|
||||
}
|
||||
|
||||
pub fn message_widget(msg: &Message) -> impl Widget<UiError> {
|
||||
pub fn message_widget(msg: &Message) -> impl Widget<UiError> + use<> {
|
||||
let heading_style = Style::new().bold();
|
||||
|
||||
let mut text = Styled::new("Message", heading_style).then_plain("\n");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub fn widget<'a>(
|
|||
list: &'a mut ListState<SessionId>,
|
||||
joined: &Joined,
|
||||
focused: bool,
|
||||
) -> impl Widget<UiError> + 'a {
|
||||
) -> impl Widget<UiError> + use<'a> {
|
||||
let mut list_builder = ListBuilder::new();
|
||||
render_rows(&mut list_builder, joined, focused);
|
||||
list_builder.build(list)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ pub enum RoomPopup {
|
|||
}
|
||||
|
||||
impl RoomPopup {
|
||||
fn server_error_widget(description: &str, reason: &str) -> impl Widget<UiError> {
|
||||
fn server_error_widget(description: &str, reason: &str) -> impl Widget<UiError> + use<> {
|
||||
let border_style = Style::new().red().bold();
|
||||
let text = Styled::new_plain(description)
|
||||
.then_plain("\n\n")
|
||||
|
|
@ -23,7 +23,7 @@ impl RoomPopup {
|
|||
Popup::new(Text::new(text), ("Error", border_style)).with_border_style(border_style)
|
||||
}
|
||||
|
||||
pub fn widget(&self) -> impl Widget<UiError> {
|
||||
pub fn widget(&self) -> impl Widget<UiError> + use<> {
|
||||
match self {
|
||||
Self::Error {
|
||||
description,
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ impl EuphRoom {
|
|||
.boxed_async()
|
||||
}
|
||||
|
||||
async fn status_widget(&self, state: Option<&euph::State>) -> impl Widget<UiError> {
|
||||
async fn status_widget(&self, state: Option<&euph::State>) -> impl Widget<UiError> + use<> {
|
||||
let room_style = Style::new().bold().blue();
|
||||
let mut info = Styled::new(format!("{} ", self.domain()), Style::new().grey())
|
||||
.then(format!("&{}", self.name()), room_style);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ fn render_group_info(builder: &mut Builder, group_info: KeyGroupInfo<'_>) {
|
|||
pub fn widget<'a>(
|
||||
list: &'a mut ListState<Infallible>,
|
||||
config: &Config,
|
||||
) -> impl Widget<UiError> + 'a {
|
||||
) -> impl Widget<UiError> + use<'a> {
|
||||
let mut list_builder = ListBuilder::new();
|
||||
|
||||
for group_info in config.keys.groups() {
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ impl Rooms {
|
|||
list: &'a mut ListState<RoomIdentifier>,
|
||||
order: Order,
|
||||
euph_rooms: &HashMap<RoomIdentifier, EuphRoom>,
|
||||
) -> impl Widget<UiError> + 'a {
|
||||
) -> impl Widget<UiError> + use<'a> {
|
||||
let version_info = Styled::new_plain("Welcome to ")
|
||||
.then(format!("{NAME} {VERSION}"), Style::new().yellow().bold())
|
||||
.then_plain("!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue