Skip to content

Commit 69bb77f

Browse files
1 parent 479a978 commit 69bb77f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

build.rs

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#![allow(non_snake_case)]
2-
3-
use std::fs;
4-
5-
use serde::Deserialize;
6-
71
#[derive(Deserialize)]
82
struct Toml {
93
package:Package,
@@ -19,9 +13,11 @@ fn main() {
1913

2014
println!(
2115
"cargo:rustc-env=CARGO_PKG_VERSION={}",
22-
(toml::from_str::<Toml>(&fs::read_to_string("Cargo.toml").expect("Cannot Cargo.toml."))
23-
.expect("Cannot toml."))
24-
.package
25-
.version
16+
toml::from_str::<Toml>(&std::fs::read_to_string("Cargo.toml").expect("Cannot Cargo.toml."))
17+
.expect("Cannot toml.")
18+
.package
19+
.version
2620
);
2721
}
22+
23+
use serde::Deserialize;

0 commit comments

Comments
 (0)