diff --git a/.gitignore b/.gitignore index 3cb0f9c..6fcab73 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ # Rust build artifacts & ad-hoc rustc binaries target/ **/*.rs.bk -01-introduction-to-rust/mylib/src/listings diff --git a/01-introduction-to-rust/Cargo.lock b/01-introduction-to-rust/Cargo.lock new file mode 100644 index 0000000..289e92a --- /dev/null +++ b/01-introduction-to-rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ch01_intro_rust" +version = "0.1.0" diff --git a/01-introduction-to-rust/mylib/Cargo.toml b/01-introduction-to-rust/Cargo.toml similarity index 70% rename from 01-introduction-to-rust/mylib/Cargo.toml rename to 01-introduction-to-rust/Cargo.toml index bf0d4b1..3f15449 100644 --- a/01-introduction-to-rust/mylib/Cargo.toml +++ b/01-introduction-to-rust/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mylib" +name = "ch01_intro_rust" version = "0.1.0" edition = "2024" diff --git a/01-introduction-to-rust/mylib/src/lib.rs b/01-introduction-to-rust/mylib/src/lib.rs deleted file mode 100644 index b93cf3f..0000000 --- a/01-introduction-to-rust/mylib/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub fn add(left: u64, right: u64) -> u64 { - left + right -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn it_works() { - let result = add(2, 2); - assert_eq!(result, 4); - } -} diff --git a/01-introduction-to-rust/mylib/src/listings.rs b/01-introduction-to-rust/src/bin/listings.rs similarity index 100% rename from 01-introduction-to-rust/mylib/src/listings.rs rename to 01-introduction-to-rust/src/bin/listings.rs