let mut variable: Type;
loop {
    variable = value;
}

or

loop {
    let variable: Type = value;
}
  • asudox@lemmy.asudox.dev
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 month ago

    The second one is more expensive as you constantly are creating a new variable. In the first one you just constantly change the value of a variable.