is it "an str" (ess-tee-arh) or "a str" (stir)?

This commit is contained in:
Lynne Megido 2021-09-23 02:09:57 +10:00
parent 043e0972c5
commit afa2bb8784
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90

View File

@ -24,11 +24,11 @@ static CLAP_VERSION: OnceCell<String> = OnceCell::new();
static CLAP_LONG_VERSION: OnceCell<String> = OnceCell::new();
/// Sets [`CLAP_VERSION`] to be the version defined in Cargo.toml, prefixed with a v (e.g. "v0.3.1"), then returns it as
/// a String.
/// an str.
pub fn clap_version() -> &'static str { CLAP_VERSION.get_or_init(|| String::from("v") + VERSION.unwrap_or("???")) }
/// Sets [`CLAP_LONG_VERSION`] to be similar to [`CLAP_VERSION`], followed by the chosen backend in parentheses (e.g.
/// "v0.3.1 (XDG-Mime backend)"), then returns it as a String.
/// Sets [`CLAP_LONG_VERSION`] to be similar to [`CLAP_VERSION`], followed by the chosen backend and abbreviated git
/// commit hash in parentheses (e.g. "v0.3.6 (XDG-Mime backend, commit #043e097)"), then returns it as an str.
pub fn clap_long_version() -> &'static str {
CLAP_LONG_VERSION.get_or_init(|| {
format!(