mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2024-11-09 08:51:18 +08:00
update listings ch07 close #654
This commit is contained in:
parent
173ed4adc4
commit
f873a162ef
7
listings/ch07-managing-growing-projects/quick-reference-example/Cargo.lock
generated
Executable file
7
listings/ch07-managing-growing-projects/quick-reference-example/Cargo.lock
generated
Executable file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "backyard"
|
||||
version = "0.1.0"
|
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "backyard"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
@ -0,0 +1,5 @@
|
||||
$ cargo run
|
||||
Compiling backyard v0.1.0 (file:///projects/backyard)
|
||||
Finished dev [unoptimized + debuginfo] target(s) in 0.36s
|
||||
Running `target/debug/backyard`
|
||||
I'm growing Asparagus!
|
@ -0,0 +1 @@
|
||||
pub mod vegetables;
|
@ -0,0 +1,2 @@
|
||||
#[derive(Debug)]
|
||||
pub struct Asparagus {}
|
@ -0,0 +1,8 @@
|
||||
use crate::garden::vegetables::Asparagus;
|
||||
|
||||
pub mod garden;
|
||||
|
||||
fn main() {
|
||||
let plant = Asparagus {};
|
||||
println!("I'm growing {:?}!", plant);
|
||||
}
|
Loading…
Reference in New Issue
Block a user