Flatten nested Rust projects into monorepo

This commit is contained in:
2025-07-01 10:51:25 +03:00
commit 1170ebe04d
29 changed files with 557 additions and 0 deletions

7
branches/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 = 4
[[package]]
name = "branches"
version = "0.1.0"

6
branches/Cargo.toml Normal file
View File

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

20
branches/src/main.rs Normal file
View File

@@ -0,0 +1,20 @@
fn main() {
let condition = true;
let result = if condition { 5 } else { 6 };
// let result = if condition { 5 } else { 'six' };
// will throw an error, should be the same type
println!("The result is {result}");
let number = 6;
if number % 4 == 0 {
println!("number is divisible by 4");
} else if number % 3 == 0 {
println!("number is divisible by 3");
} else if number % 2 == 0 {
println!("number is divisible by 2");
} else {
println!("number is not divisible by 4, 3, or 2");
}
}