Answers for "debug rust"

0

debug rust

#[derive(Debug)]
struct Point {
    x: i32,
    y: i32,
}

let origin = Point { x: 0, y: 0 };

assert_eq!(format!("The origin is: {:?}", origin), "The origin is: Point { x: 0, y: 0 }");
Posted by: Guest on May-07-2022

Browse Popular Code Answers by Language