Demonstrate the use of the dbg
macro
This commit is contained in:
parent
f9841faa16
commit
d9963ced18
1 changed files with 3 additions and 2 deletions
|
@ -5,10 +5,11 @@ struct Rectangle {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let scale = 2;
|
||||
let rect1 = Rectangle {
|
||||
width: 30,
|
||||
width: dbg!(30 * scale),
|
||||
height: 50,
|
||||
};
|
||||
|
||||
println!("rect1 is {rect1:#?}");
|
||||
dbg!(&rect1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue