lint, removed DHAT

This commit is contained in:
Eugene Pankov 2022-11-21 22:01:14 +01:00
parent fffd799a5a
commit 468f4c6582
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
4 changed files with 3 additions and 13 deletions

View file

@ -213,8 +213,8 @@ fn process_credentials(credentials: &Vec<UserAuthCredential>) -> Vec<UserAuthCre
let mut credentials = credentials.clone();
for credential in credentials.iter_mut() {
if let UserAuthCredential::Password(ref mut c) = credential {
if parse_hash(&c.hash.expose_secret()).is_err() {
c.hash = hash_password(&c.hash.expose_secret()).into();
if parse_hash(c.hash.expose_secret()).is_err() {
c.hash = hash_password(c.hash.expose_secret()).into();
}
}
}

View file

@ -449,7 +449,7 @@ async fn proxy_ws_inner(
.send(Message::Close(data.map(|data| {
(
CloseCode::from(data.code),
data.reason.into_owned().to_string(),
data.reason.into_owned(),
)
})))
.await?;

View file

@ -15,7 +15,6 @@ config = { version = "0.13", features = ["yaml"], default_features = false }
console = { version = "0.15", default_features = false }
console-subscriber = { version = "0.1", optional = true }
data-encoding = "2.3"
dhat = { version = "0.3", optional = true }
dialoguer = "0.10"
futures = "0.3"
notify = "^5.0.0"
@ -44,8 +43,6 @@ sd-notify = "0.4"
[features]
default = ["sqlite"]
dhat-ad-hoc = ["dhat"]
dhat-heap = ["dhat"]
tokio-console = ["dep:console-subscriber", "tokio/tracing"]
postgres = ["warpgate-core/postgres"]
mysql = ["warpgate-core/mysql"]

View file

@ -11,10 +11,6 @@ use tracing::*;
use crate::config::load_config;
#[cfg(feature = "dhat-heap")]
#[global_allocator]
static ALLOC: dhat::Alloc = dhat::Alloc;
#[derive(clap::Parser)]
#[clap(author, version, about, long_about = None)]
#[clap(propagate_version = true)]
@ -108,9 +104,6 @@ async fn _main() -> Result<()> {
#[tokio::main]
async fn main() {
#[cfg(feature = "dhat-heap")]
let _profiler = dhat::Profiler::new_heap();
if let Err(error) = _main().await {
error!(?error, "Fatal error");
std::process::exit(1);