Skip to content

Commit 8704f87

Browse files
committed
add t250108-reference and rename old crates
1 parent fe04c60 commit 8704f87

File tree

45 files changed

+125
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+125
-94
lines changed

Cargo.toml

+16-15
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@ repository = "https://github.com/lispking/rust-tips.git"
1414
[workspace]
1515
resolver = "2"
1616
members = [
17-
"t01-match",
18-
"t02-iter",
19-
"t03-trait",
20-
"t04-arc",
21-
"t04-rc",
22-
"t05-enum",
23-
"t06-option",
24-
"t07-result",
25-
"t08-ownership",
26-
"t09-higher-order-fun",
27-
"t10-from-to",
28-
"t11-question-mark",
29-
"t12-slice",
30-
"t13-box",
31-
"t14-generic",
17+
"t241225-match",
18+
"t241226-iter",
19+
"t241227-trait",
20+
"t241228-arc",
21+
"t241228-rc",
22+
"t241229-enum",
23+
"t241230-option",
24+
"t241231-result",
25+
"t250101-ownership",
26+
"t250102-higher-order-fun",
27+
"t250103-from-to",
28+
"t250104-question-mark",
29+
"t250105-slice",
30+
"t250106-box",
31+
"t250107-generic",
32+
"t250108-reference"
3233
]

t04-rc/Cargo.toml

-7
This file was deleted.

t05-enum/Cargo.toml

-7
This file was deleted.

t11-question-mark/Cargo.toml

-14
This file was deleted.

t12-slice/Cargo.toml

-14
This file was deleted.

t13-box/Cargo.toml

-14
This file was deleted.

t14-generic/Cargo.toml

-14
This file was deleted.
File renamed without changes.

t241225-match/Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "t241225-match"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
7+
[dependencies]
File renamed without changes.
File renamed without changes.

t03-trait/Cargo.toml renamed to t241226-iter/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t03-trait"
2+
name = "t241226-iter"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.
File renamed without changes.

t241227-trait/Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "t241227-trait"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
7+
[dependencies]
File renamed without changes.
File renamed without changes.

t02-iter/Cargo.toml renamed to t241228-arc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t02-iter"
2+
name = "t241228-arc"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.
File renamed without changes.

t01-match/Cargo.toml renamed to t241228-rc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t01-match"
2+
name = "t241228-rc"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.
File renamed without changes.

t04-arc/Cargo.toml renamed to t241229-enum/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t04-arc"
2+
name = "t241229-enum"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.

t08-ownership/Cargo.toml renamed to t241230-option/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t08-ownership"
2+
name = "t241230-option"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.

t10-from-to/Cargo.toml renamed to t241231-result/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t10-from-to"
2+
name = "t241231-result"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.

t250101-ownership/Cargo.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "t250101-ownership"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
readme.workspace = true
8+
description.workspace = true
9+
keywords.workspace = true
10+
categories.workspace = true
11+
homepage.workspace = true
12+
repository.workspace = true
13+
14+
[dependencies]
File renamed without changes.

t250102-higher-order-fun/Cargo.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "t250102-higher-order-fun"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
readme.workspace = true
8+
description.workspace = true
9+
keywords.workspace = true
10+
categories.workspace = true
11+
homepage.workspace = true
12+
repository.workspace = true
13+
14+
[dependencies]

t250103-from-to/Cargo.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "t250103-from-to"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
readme.workspace = true
8+
description.workspace = true
9+
keywords.workspace = true
10+
categories.workspace = true
11+
homepage.workspace = true
12+
repository.workspace = true
13+
14+
[dependencies]
File renamed without changes.

t09-higher-order-fun/Cargo.toml renamed to t250104-question-mark/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t09-higher-order-fun"
2+
name = "t250104-question-mark"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.

t07-result/Cargo.toml renamed to t250105-slice/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t07-result"
2+
name = "t250105-slice"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.

t06-option/Cargo.toml renamed to t250106-box/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "t06-option"
2+
name = "t250106-box"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true
File renamed without changes.

t250107-generic/Cargo.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "t250107-generic"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
readme.workspace = true
8+
description.workspace = true
9+
keywords.workspace = true
10+
categories.workspace = true
11+
homepage.workspace = true
12+
repository.workspace = true
13+
14+
[dependencies]
File renamed without changes.

t250108-reference/Cargo.toml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "t250108-reference"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
readme.workspace = true
8+
description.workspace = true
9+
keywords.workspace = true
10+
categories.workspace = true
11+
homepage.workspace = true
12+
repository.workspace = true
13+
14+
[dependencies]

t250108-reference/src/main.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
fn modify_value(num: &mut i32) {
2+
*num += 1;
3+
}
4+
5+
fn double_value(num: &i32) -> i32 {
6+
*num * 2
7+
}
8+
9+
fn main() {
10+
let mut number = 5;
11+
modify_value(&mut number);
12+
println!("Modified number: {}", number);
13+
14+
let num = 3;
15+
println!("double value: {}", double_value(&num));
16+
}

0 commit comments

Comments
 (0)