Skip to content

Commit 9e60a04

Browse files
Be-ingobsoleszenz
authored andcommitted
rename "examples" to "demos" to avoid confusion with Cargo examples
I got confused because I tried to run the player with: cargo run --examples demo_player However this did not work because demo_player is structured as a subcrate in a workspace, not as an example. Cargo examples do not have a src directory nor their own Cargo.toml: https://doc.rust-lang.org/cargo/guide/project-layout.html Unfortunately there is no way to specify dependencies only for an example. There is an open RFC for that: rust-lang/rfcs#2887 So for now, I think it is best to leave the demo applications as subcrates in a workspace, but rename the "examples" directory to "demos" so people don't think they will work with cargo run --examples
1 parent 38d00bd commit 9e60a04

File tree

15 files changed

+6
-6
lines changed

15 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ members = [
2121
"core",
2222
"decode_wav",
2323
"encode_wav",
24-
"examples/demo_player",
25-
"examples/demo_writer",
24+
"demos/player",
25+
"demos/writer",
2626
]
2727

2828
[features]

examples/demo_player/Cargo.toml renamed to demos/player/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "demo_player"
2+
name = "player"
33
version = "0.1.0"
44
authors = ["Billy Messenger <BillyDM@protonmail.com>"]
55
edition = "2018"
@@ -11,4 +11,4 @@ publish = false
1111
creek = { path = "../../" }
1212
eframe = "0.9.0"
1313
rtrb = "0.2"
14-
cpal = "0.13"
14+
cpal = "0.13"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/demo_writer/Cargo.toml renamed to demos/writer/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "demo_writer"
2+
name = "writer"
33
version = "0.1.0"
44
authors = ["Billy Messenger <BillyDM@protonmail.com>"]
55
edition = "2018"
@@ -11,4 +11,4 @@ publish = false
1111
creek = { path = "../../" }
1212
eframe = "0.9.0"
1313
rtrb = "0.2"
14-
cpal = "0.13"
14+
cpal = "0.13"
File renamed without changes.

0 commit comments

Comments
 (0)