tweak bpaf usage message

As discussed here: https://github.com/pacak/bpaf/discussions/165#discussioncomment-4967176

I also snuck in a conversion from `lazy_static` to `once_cell`, rather
than adding another usage of the former.
This commit is contained in:
Scott Lamb
2023-02-13 21:19:55 -08:00
parent 015dfef9c9
commit 2b27797f42
17 changed files with 120 additions and 85 deletions

View File

@@ -9,7 +9,6 @@ use crate::schema::Permissions;
use base::{bail_t, format_err_t, strutil, ErrorKind, ResultExt as _};
use failure::{bail, format_err, Error, Fail, ResultExt as _};
use fnv::FnvHashMap;
use lazy_static::lazy_static;
use log::info;
use protobuf::Message;
use ring::rand::{SecureRandom, SystemRandom};
@@ -21,9 +20,8 @@ use std::net::IpAddr;
use std::str::FromStr;
use std::sync::Mutex;
lazy_static! {
static ref PARAMS: Mutex<scrypt::Params> = Mutex::new(scrypt::Params::recommended());
}
static PARAMS: once_cell::sync::Lazy<Mutex<scrypt::Params>> =
once_cell::sync::Lazy::new(|| Mutex::new(scrypt::Params::recommended()));
/// For testing only: use fast but insecure hashes.
/// Call via `testutil::init()`.