Skip to content

Commit 10e2fe3

Browse files
committed
benches: Move assets outside of benches
Also specify the paths of the benchmarks, since publishing breaks when it cannot find them.
1 parent d7199f1 commit 10e2fe3

16 files changed

+37
-17
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/Serial-ATA/lofty-rs"
99
keywords = ["tags", "audio", "metadata", "id3", "vorbis"]
1010
categories = ["multimedia", "multimedia::audio", "parser-implementations"]
1111
readme = "README.md"
12-
include = ["src", "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "benches", "SUPPORTED_FORMATS.md"]
12+
include = ["src", "Cargo.toml", "LICENSE-APACHE", "LICENSE-MIT", "SUPPORTED_FORMATS.md"]
1313

1414
[dependencies]
1515
# Vorbis comments pictures
@@ -47,10 +47,12 @@ bench = false
4747

4848
[[bench]]
4949
name = "read_file"
50+
path = "benches/read_file.rs"
5051
harness = false
5152

5253
[[bench]]
5354
name = "create_tag"
55+
path = "benches/create_tag.rs"
5456
harness = false
5557

5658
[[example]]

benches/create_tag.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn bench_write(c: &mut Criterion) {
4949
PictureType::CoverFront,
5050
MimeType::Jpeg,
5151
None,
52-
include_bytes!("assets/cover.jpg").to_vec(),
52+
include_bytes!("../benches_assets/cover.jpg").to_vec(),
5353
);
5454

5555
tag.insert(
@@ -75,7 +75,7 @@ fn bench_write(c: &mut Criterion) {
7575
PictureType::CoverFront,
7676
MimeType::Jpeg,
7777
None,
78-
include_bytes!("assets/cover.jpg").to_vec(),
78+
include_bytes!("../benches_assets/cover.jpg").to_vec(),
7979
);
8080

8181
tag.insert_picture(picture);
@@ -99,7 +99,7 @@ fn bench_write(c: &mut Criterion) {
9999
PictureType::CoverFront,
100100
MimeType::Jpeg,
101101
None,
102-
include_bytes!("assets/cover.jpg").to_vec(),
102+
include_bytes!("../benches_assets/cover.jpg").to_vec(),
103103
);
104104

105105
tag.insert_picture(picture);
@@ -118,7 +118,7 @@ fn bench_write(c: &mut Criterion) {
118118
PictureType::CoverFront,
119119
MimeType::Jpeg,
120120
None,
121-
include_bytes!("assets/cover.jpg").to_vec(),
121+
include_bytes!("../benches_assets/cover.jpg").to_vec(),
122122
);
123123

124124
let _ = tag.insert_picture(picture, None).unwrap();

0 commit comments

Comments
 (0)