diff --git a/src/formats.rs b/src/formats.rs index 7cf12e1..13429f4 100644 --- a/src/formats.rs +++ b/src/formats.rs @@ -10,7 +10,7 @@ use cfg_if::cfg_if; use snailquote::escape; use crate::findings::ScanError; -use crate::utils::{BACKEND, VERSION}; +use crate::utils::clap_long_version; use crate::Findings; use itertools::Itertools; @@ -74,7 +74,7 @@ impl<'a> From<&'a OsStr> for Writable<'a> { fn from(p: &'a OsStr) -> Writable<'a> { Writable::Path(p.as_ref()) } } -fn generated_by() -> String { format!("Generated by fif {} ({} backend)", VERSION.unwrap_or("???"), BACKEND) } +fn generated_by() -> String { format!("Generated by fif {}", clap_long_version()) } fn smart_write(f: &mut W, writeables: &[Writable]) -> io::Result<()> { // ehhhh diff --git a/src/utils.rs b/src/utils.rs index 6db4143..ee95d8b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -33,6 +33,7 @@ pub fn clap_long_version() -> &'static str { /// Returns the name of the target operating system, like "Windows" or "macOS". Won't account for things like Wine or /// Linuxulator. +#[allow(clippy::option_map_unit_fn)] pub fn os_name() -> String { use std::env::consts::OS; match OS {