mirror of
https://github.com/learning-forge/marshal-rust.git
synced 2026-11-30 21:30:31 +00:00
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:
1 parent
b768383767
commit
564503c4c8
5 files changed
+8
-16
No files matched your search
@@ -4,4 +4,3 @@
|
||||
# Rust build artifacts & ad-hoc rustc binaries
|
||||
target/
|
||||
**/*.rs.bk
|
||||
01-introduction-to-rust/mylib/src/listings
|
||||
Generated
+7
@@ -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]
|
||||
name = "mylib"
|
||||
name = "ch01_intro_rust"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
Reference in new issue
Block a user