env! evaluates environment variables at compile time, and cargo set CARGO_PKG_VERSION to the current version number, as defined in Cargo.toml.
Test Plan:
printed out the headers object (by temporarily adding println!("HEADER: {:?}", headers);), and checked the User-Agent header has correct version number
env!
evaluates environment variables at compile time, and cargo setCARGO_PKG_VERSION
to the current version number, as defined inCargo.toml
.Test Plan: printed out the headers object (by temporarily adding
println!("HEADER: {:?}", headers);
), and checked the User-Agent header has correct version number