format_env

Crates.ioformat_env
lib.rsformat_env
version1.0.1
sourcesrc
created_at2020-11-13 02:30:07.072886
updated_at2020-11-13 23:35:58.534245
descriptionSubstitutes environment variables into a string literal at compile time
homepagehttps://gitlab.com/GrantMoyer/format_env
repositoryhttps://gitlab.com/GrantMoyer/format_env
max_upload_size
id311813
size7,614
Grant Moyer (GrantMoyer)

documentation

README

Substitues environment variables into a string literal at compile time.

Example:

use format_env::format_env;
assert_eq!(format_env!("Name: $(CARGO_PKG_NAME), License: $(CARGO_PKG_LICENSE)"), "Name: format_env, License: MIT")
assert_eq!(format_env!("Name: $$(CARGO_PKG_NAME)"), "Name: $(CARGO_PKG_NAME)")
Commit count: 3

cargo fmt