feat: v1.7.13
This commit is contained in:
@@ -214,7 +214,7 @@ pub fn read_number(hint: &str, from: usize, to: usize) -> usize {
|
||||
}
|
||||
|
||||
pub fn is_tiny_enc_file(filename: &str) -> bool {
|
||||
return filename.ends_with(TINY_ENC_FILE_EXT) || filename.ends_with(TINY_ENC_PEM_FILE_EXT);
|
||||
filename.ends_with(TINY_ENC_FILE_EXT) || filename.ends_with(TINY_ENC_PEM_FILE_EXT)
|
||||
}
|
||||
|
||||
pub fn get_user_agent() -> String {
|
||||
@@ -291,9 +291,11 @@ pub fn ratio(numerator: u64, denominator: u64) -> String {
|
||||
format!("{:.2}", r as f64 / 100f64)
|
||||
}
|
||||
|
||||
#[allow(clippy::declare_interior_mutable_const)]
|
||||
const CTRL_C_SET: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
pub fn register_ctrlc() {
|
||||
#[allow(clippy::borrow_interior_mutable_const)]
|
||||
if !CTRL_C_SET.load(Ordering::SeqCst) {
|
||||
CTRL_C_SET.store(true, Ordering::SeqCst);
|
||||
let _ = ctrlc::set_handler(move || {
|
||||
|
||||
Reference in New Issue
Block a user