mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-09-20 06:46:17 +08:00
lint, removed DHAT
This commit is contained in:
parent
fffd799a5a
commit
468f4c6582
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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?;
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue