Compare commits
6 commits
bca900b692
...
d9963ced18
Author | SHA1 | Date | |
---|---|---|---|
d9963ced18 | |||
f9841faa16 | |||
2b3f04ce4c | |||
72cd4da20e | |||
1fbb0d803b | |||
41fde7bef9 |
3 changed files with 28 additions and 0 deletions
7
rectangles/Cargo.lock
generated
Normal file
7
rectangles/Cargo.lock
generated
Normal 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
6
rectangles/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[package]
|
||||||
|
name = "rectangles"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
15
rectangles/src/main.rs
Normal file
15
rectangles/src/main.rs
Normal 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);
|
||||||
|
}
|
Loading…
Reference in a new issue