Skip to content

Commit b46b058

Browse files
committed
add the project manage example
1 parent 3a17e17 commit b46b058

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

code/examples/m1/Cargo.toml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "m1"
3+
version = "0.1.0"
4+
authors = ["wanghanwei <[email protected]>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]

code/examples/m1/src/main.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mod sort;
2+
mod sort_util;
3+
fn main() {
4+
println!("Hello, world!");
5+
sort::sort1();
6+
sort_util::quick_sort::qik_sort();
7+
}

code/examples/m1/src/sort.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub fn sort1() {
2+
println!("sort 1");
3+
}

code/examples/m1/src/sort_util.rs

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod quick_sort;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub fn qik_sort() {
2+
println!("asdfasfd");
3+
}

0 commit comments

Comments
 (0)