donut repeat yourself
This commit is contained in:
parent
8b2b26d44f
commit
ec4ad77136
2 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,7 @@ use cfg_if::cfg_if;
|
||||||
use snailquote::escape;
|
use snailquote::escape;
|
||||||
|
|
||||||
use crate::findings::ScanError;
|
use crate::findings::ScanError;
|
||||||
use crate::utils::{BACKEND, VERSION};
|
use crate::utils::clap_long_version;
|
||||||
use crate::Findings;
|
use crate::Findings;
|
||||||
use itertools::Itertools;
|
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 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<()> {
|
fn smart_write<W: Write>(f: &mut W, writeables: &[Writable]) -> io::Result<()> {
|
||||||
// ehhhh
|
// ehhhh
|
||||||
|
|
|
@ -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
|
/// Returns the name of the target operating system, like "Windows" or "macOS". Won't account for things like Wine or
|
||||||
/// Linuxulator.
|
/// Linuxulator.
|
||||||
|
#[allow(clippy::option_map_unit_fn)]
|
||||||
pub fn os_name() -> String {
|
pub fn os_name() -> String {
|
||||||
use std::env::consts::OS;
|
use std::env::consts::OS;
|
||||||
match OS {
|
match OS {
|
||||||
|
|
Loading…
Reference in a new issue