Code QuizBeginner

Accessing Struct Fields

Identifying the wrong syntax for reading a struct field.

Coderust
struct Rectangle {
    width: u32,
    height: u32,
}

fn main() {
    let rect = Rectangle { width: 30, height: 50 };
    println!("Width: {}", rect->width);
}

What is the bug in how the field is accessed?