donut repeat yourself

This commit is contained in:
Lynne Megido 2021-06-14 17:54:11 +10:00
parent 8b2b26d44f
commit ec4ad77136
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
2 changed files with 3 additions and 2 deletions

View File

@ -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<W: Write>(f: &mut W, writeables: &[Writable]) -> io::Result<()> {
// ehhhh

View File

@ -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 {