Skip to content

Commit

Permalink
Auto merge of #14637 - nyurik:patch-1, r=weihanglo
Browse files Browse the repository at this point in the history
Fix `cargo:version_number` - has only one `:`

See [openssl code](https://github.com/sfackler/rust-openssl/blob/8d60e211460122768a1deab0549e35577a52dbeb/openssl-sys/build/main.rs#L392) -- it uses a single colon. Also inlined arg into format to make it a bit more consice.

```rust
let openssl_version = openssl_version.unwrap();
println!("cargo:version_number={:x}", openssl_version);
if openssl_version >= 0x4_00_00_00_0 {
...
```
  • Loading branch information
bors committed Oct 3, 2024
2 parents 2652990 + f64f11d commit 8725e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/src/reference/build-script-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ script looks something [like
this](https://github.com/sfackler/rust-openssl/blob/dc72a8e2c429e46c275e528b61a733a66e7877fc/openssl-sys/build/main.rs#L216):

```rust,ignore
println!("cargo::version_number={:x}", openssl_version);
println!("cargo::metadata=version_number={openssl_version:x}");
```

This instruction causes the `DEP_OPENSSL_VERSION_NUMBER` environment variable
Expand Down

0 comments on commit 8725e78

Please sign in to comment.