Skip to content

Commit 43db701

Browse files
committed
Get package version from environment
1 parent a291c82 commit 43db701

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

librustls/tests/rustls_version.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ fn rustls_version_match() {
2626
.expect("failed to read Cargo.toml");
2727
let metadata = metadata_content.parse::<Table>().unwrap();
2828

29-
// Find the crate version specified in Cargo.toml
30-
let package_metadata = metadata["package"]
31-
.as_table()
32-
.expect("missing package metadata");
33-
let crate_version = package_metadata["version"]
34-
.as_str()
35-
.expect("missing crate version");
36-
3729
let rustls_crypto_provider = {
3830
if cfg!(all(feature = "ring", not(feature = "aws-lc-rs"))) {
3931
"ring"
@@ -65,7 +57,7 @@ fn rustls_version_match() {
6557
rustls_ffi_version_parts,
6658
vec![
6759
env!("CARGO_PKG_NAME"),
68-
crate_version,
60+
env!("CARGO_PKG_VERSION"),
6961
"rustls",
7062
rustls_dep_version,
7163
rustls_crypto_provider,

0 commit comments

Comments
 (0)