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

@@ -24,7 +24,6 @@ fnv = "1.0"
futures = "0.3"
h264-reader = "0.6.0"
hashlink = "0.8.1"
lazy_static = "1.0"
libc = "0.2"
log = "0.4"
mylog = { git = "https://github.com/scottlamb/mylog" }
@@ -46,6 +45,7 @@ tokio = { version = "1.24", features = ["macros", "rt-multi-thread", "sync"] }
url = { version = "2.1.1", features = ["serde"] }
uuid = { version = "1.1.2", features = ["serde", "std", "v4"] }
itertools = "0.10.0"
once_cell = "1.17.0"
[build-dependencies]
protobuf-codegen = "3.0"

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()`.