feat: updates
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
use std::{fs, io};
|
||||
use std::io::Write;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::Path;
|
||||
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose;
|
||||
use rust_util::{opt_result, simple_error, warning, XResult};
|
||||
use rust_util::{simple_error, warning, XResult};
|
||||
use zeroize::Zeroize;
|
||||
|
||||
pub const ENC_AES256_GCM_P256: &str = "aes256-gcm-p256";
|
||||
@@ -25,7 +25,7 @@ pub fn require_file_exists(path: impl AsRef<Path>) -> XResult<()> {
|
||||
let path = path.as_ref();
|
||||
match fs::metadata(path) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(e) => simple_error!("File: {} not exists", path.display()),
|
||||
Err(_) => simple_error!("File: {} not exists", path.display()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user