Code QuizBeginner

Mutating a Struct Field

Catching the missing mutability when changing a field.

Coderust
struct Counter {
    value: i32,
}

fn main() {
    let counter = Counter { value: 0 };
    counter.value = 10;
    println!("{}", counter.value);
}

What is the bug that prevents this code from compiling?