Upd Crates, Rust, MSRV, GHA and remove Backtrace

- Changed MSRV to v1.65.
  Discussed this with @dani-garcia, and we will support **N-2**.
  This is/will be the same as for the `time` crate we use.
  Also updated the wiki regarding this https://github.com/dani-garcia/vaultwarden/wiki/Building-binary
- Removed backtrace crate in favor of `std::backtrace` stable since v1.65
- Updated Rust to v1.67.1
- Updated all the crates
- Updated the GHA action versions
- Adjusted the GHA MSRV build to extract the MSRV from `Cargo.toml`
This commit is contained in:
BlackDex
2023-03-04 19:18:38 +01:00
parent a13a5bd1d8
commit 0c0e632bc9
27 changed files with 200 additions and 231 deletions

View File

@ -191,7 +191,7 @@ fn parse_args() {
}
let argon2 = Argon2::new(Argon2id, V0x13, argon2_params.build().unwrap());
let salt = SaltString::b64_encode(&crate::crypto::get_random_bytes::<32>()).unwrap();
let salt = SaltString::encode_b64(&crate::crypto::get_random_bytes::<32>()).unwrap();
let argon2_timer = tokio::time::Instant::now();
if let Ok(password_hash) = argon2.hash_password(password.as_bytes(), &salt) {
@ -325,12 +325,12 @@ fn init_logging(level: log::LevelFilter) -> Result<(), fern::InitError> {
},
};
let backtrace = backtrace::Backtrace::new();
let backtrace = std::backtrace::Backtrace::force_capture();
match info.location() {
Some(location) => {
error!(
target: "panic", "thread '{}' panicked at '{}': {}:{}\n{:?}",
target: "panic", "thread '{}' panicked at '{}': {}:{}\n{:}",
thread,
msg,
location.file(),
@ -340,7 +340,7 @@ fn init_logging(level: log::LevelFilter) -> Result<(), fern::InitError> {
}
None => error!(
target: "panic",
"thread '{}' panicked at '{}'\n{:?}",
"thread '{}' panicked at '{}'\n{:}",
thread,
msg,
backtrace