Add elided lifetimes to view helpers in examples

This commit is contained in:
Héctor Ramón Jiménez 2025-06-24 14:29:36 +02:00
parent bde4572bc5
commit 5ca5000cdc
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
50 changed files with 95 additions and 84 deletions

View file

@ -63,7 +63,7 @@ impl Pokedex {
}
}
fn view(&self) -> Element<Message> {
fn view(&self) -> Element<'_, Message> {
let content: Element<_> = match self {
Pokedex::Loading => {
text("Searching for Pokémon...").size(40).into()
@ -100,7 +100,7 @@ struct Pokemon {
impl Pokemon {
const TOTAL: u16 = 807;
fn view(&self) -> Element<Message> {
fn view(&self) -> Element<'_, Message> {
row![
image::viewer(self.image.clone()),
column![