Skip to content

Commit 8221cac

Browse files
committed
Clarify comment and add example
1 parent 6ab807a commit 8221cac

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

content/rust/cargo.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
+++
22
title="Cargo"
33
date=2023-06-16
4-
updated = 2025-04-26
4+
updated = 2025-05-11
55
extra = { series = "Rust" }
66
taxonomies = { tags = ["Rust"] }
77
+++
@@ -43,10 +43,11 @@ Example
4343

4444
```rust
4545
println!("{}", env!("CARGO_PKG_NAME"));
46+
println!("{}", env!("CARGO_PKG_VERSION"));
4647
```
4748

4849
- CARGO_PKG_NAME
49-
- CARGO_PKG_VERSION (Prefer use of [Version Crate](https://crates.io/crates/version))
50+
- CARGO_PKG_VERSION (As an alternative you may use the [Version Crate](https://crates.io/crates/version))
5051

5152
# Specifying dependencies
5253

0 commit comments

Comments
 (0)