refactor(ch01): flatten crate layout to use src/bin

- Remove nested 01-introduction-to-rust/mylib/ crate and obsolete .gitignore entry
- Initialize ch01_intro_rust package directly in 01-introduction-to-rust/
- Move listings.rs into src/bin/ so Cargo builds binaries into target/
This commit is contained in:
kiskaadee committed 2026-11-28 02:50:56 -05:00
1 parent b768383767
commit 564503c4c8
5 files changed
+8 -16

No files matched your search

-1
View File
@@ -4,4 +4,3 @@
# Rust build artifacts & ad-hoc rustc binaries # Rust build artifacts & ad-hoc rustc binaries
target/ target/
**/*.rs.bk **/*.rs.bk
01-introduction-to-rust/mylib/src/listings
+7
View File
@@ -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"
@@ -1,5 +1,5 @@
[package] [package]
name = "mylib" name = "ch01_intro_rust"
version = "0.1.0" version = "0.1.0"
edition = "2024" edition = "2024"
-14
View File
@@ -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);
}
}