Compare commits

..

6 commits

3 changed files with 28 additions and 0 deletions

7
rectangles/Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "rectangles"
version = "0.1.0"

6
rectangles/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "rectangles"
version = "0.1.0"
edition = "2021"
[dependencies]

15
rectangles/src/main.rs Normal file
View file

@ -0,0 +1,15 @@
#[derive(Debug)]
struct Rectangle {
width: u32,
height: u32,
}
fn main() {
let scale = 2;
let rect1 = Rectangle {
width: dbg!(30 * scale),
height: 50,
};
dbg!(&rect1);
}