Update RPIT lifetime bounds for the 2024 edition
When the bound matches the implicit bound, i.e. when you'd just write
impl ... + use<'_>
then it can be omitted. My gut instinct is to always write the bound
explicitly, but maybe that'll harm readability once I'm more used to how
bounds work now.
Anyways, always try to keep the bound as small as possible, ideally just
impl ... + use<>
This commit is contained in:
parent
d29e3e6651
commit
6c884f3077
6 changed files with 7 additions and 7 deletions
|
|
@ -35,7 +35,7 @@ impl LoggedOut {
|
|||
}
|
||||
}
|
||||
|
||||
fn widget(&mut self) -> impl Widget<UiError> + '_ {
|
||||
fn widget(&mut self) -> impl Widget<UiError> {
|
||||
let bold = Style::new().bold();
|
||||
Join4::vertical(
|
||||
Text::new(("Not logged in", bold.yellow())).segment(),
|
||||
|
|
@ -111,7 +111,7 @@ impl AccountUiState {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> + '_ {
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> {
|
||||
let inner = match self {
|
||||
Self::LoggedOut(logged_out) => logged_out.widget().first2(),
|
||||
Self::LoggedIn(logged_in) => logged_in.widget().second2(),
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pub fn new() -> EditorState {
|
|||
EditorState::new()
|
||||
}
|
||||
|
||||
pub fn widget(editor: &mut EditorState) -> impl Widget<UiError> + '_ {
|
||||
pub fn widget(editor: &mut EditorState) -> impl Widget<UiError> {
|
||||
Popup::new(
|
||||
editor.widget().with_hidden_default_placeholder(),
|
||||
"Enter password",
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ impl LinksState {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> + '_ {
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> {
|
||||
let style_selected = Style::new().black().on_white();
|
||||
|
||||
let mut list_builder = ListBuilder::new();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub fn new(joined: Joined) -> EditorState {
|
|||
EditorState::with_initial_text(joined.session.name)
|
||||
}
|
||||
|
||||
pub fn widget(editor: &mut EditorState) -> impl Widget<UiError> + '_ {
|
||||
pub fn widget(editor: &mut EditorState) -> impl Widget<UiError> {
|
||||
let inner = editor
|
||||
.widget()
|
||||
.with_highlight(|s| euph::style_nick_exact(s, Style::new()));
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ impl ConnectState {
|
|||
ConnectResult::Unhandled
|
||||
}
|
||||
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> + '_ {
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> {
|
||||
let room_style = Style::new().bold().blue();
|
||||
let domain_style = Style::new().grey();
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ impl DeleteState {
|
|||
DeleteResult::Unhandled
|
||||
}
|
||||
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> + '_ {
|
||||
pub fn widget(&mut self) -> impl Widget<UiError> {
|
||||
let warn_style = Style::new().bold().red();
|
||||
let room_style = Style::new().bold().blue();
|
||||
let text = Styled::new_plain("Are you sure you want to delete ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue