From afa2bb8784dcff220336f7ca723f3e4fc8e450e5 Mon Sep 17 00:00:00 2001 From: Lynnesbian Date: Thu, 23 Sep 2021 02:09:57 +1000 Subject: [PATCH] is it "an str" (ess-tee-arh) or "a str" (stir)? --- src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index c0f3473..621e49c 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -24,11 +24,11 @@ static CLAP_VERSION: OnceCell = OnceCell::new(); static CLAP_LONG_VERSION: OnceCell = 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!(