mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-07 23:25:13 +08:00
lint, removed DHAT
This commit is contained in:
parent
fffd799a5a
commit
468f4c6582
4 changed files with 3 additions and 13 deletions
|
@ -213,8 +213,8 @@ fn process_credentials(credentials: &Vec<UserAuthCredential>) -> Vec<UserAuthCre
|
||||||
let mut credentials = credentials.clone();
|
let mut credentials = credentials.clone();
|
||||||
for credential in credentials.iter_mut() {
|
for credential in credentials.iter_mut() {
|
||||||
if let UserAuthCredential::Password(ref mut c) = credential {
|
if let UserAuthCredential::Password(ref mut c) = credential {
|
||||||
if parse_hash(&c.hash.expose_secret()).is_err() {
|
if parse_hash(c.hash.expose_secret()).is_err() {
|
||||||
c.hash = hash_password(&c.hash.expose_secret()).into();
|
c.hash = hash_password(c.hash.expose_secret()).into();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,7 +449,7 @@ async fn proxy_ws_inner(
|
||||||
.send(Message::Close(data.map(|data| {
|
.send(Message::Close(data.map(|data| {
|
||||||
(
|
(
|
||||||
CloseCode::from(data.code),
|
CloseCode::from(data.code),
|
||||||
data.reason.into_owned().to_string(),
|
data.reason.into_owned(),
|
||||||
)
|
)
|
||||||
})))
|
})))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
|
@ -15,7 +15,6 @@ config = { version = "0.13", features = ["yaml"], default_features = false }
|
||||||
console = { version = "0.15", default_features = false }
|
console = { version = "0.15", default_features = false }
|
||||||
console-subscriber = { version = "0.1", optional = true }
|
console-subscriber = { version = "0.1", optional = true }
|
||||||
data-encoding = "2.3"
|
data-encoding = "2.3"
|
||||||
dhat = { version = "0.3", optional = true }
|
|
||||||
dialoguer = "0.10"
|
dialoguer = "0.10"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
notify = "^5.0.0"
|
notify = "^5.0.0"
|
||||||
|
@ -44,8 +43,6 @@ sd-notify = "0.4"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["sqlite"]
|
default = ["sqlite"]
|
||||||
dhat-ad-hoc = ["dhat"]
|
|
||||||
dhat-heap = ["dhat"]
|
|
||||||
tokio-console = ["dep:console-subscriber", "tokio/tracing"]
|
tokio-console = ["dep:console-subscriber", "tokio/tracing"]
|
||||||
postgres = ["warpgate-core/postgres"]
|
postgres = ["warpgate-core/postgres"]
|
||||||
mysql = ["warpgate-core/mysql"]
|
mysql = ["warpgate-core/mysql"]
|
||||||
|
|
|
@ -11,10 +11,6 @@ use tracing::*;
|
||||||
|
|
||||||
use crate::config::load_config;
|
use crate::config::load_config;
|
||||||
|
|
||||||
#[cfg(feature = "dhat-heap")]
|
|
||||||
#[global_allocator]
|
|
||||||
static ALLOC: dhat::Alloc = dhat::Alloc;
|
|
||||||
|
|
||||||
#[derive(clap::Parser)]
|
#[derive(clap::Parser)]
|
||||||
#[clap(author, version, about, long_about = None)]
|
#[clap(author, version, about, long_about = None)]
|
||||||
#[clap(propagate_version = true)]
|
#[clap(propagate_version = true)]
|
||||||
|
@ -108,9 +104,6 @@ async fn _main() -> Result<()> {
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
#[cfg(feature = "dhat-heap")]
|
|
||||||
let _profiler = dhat::Profiler::new_heap();
|
|
||||||
|
|
||||||
if let Err(error) = _main().await {
|
if let Err(error) = _main().await {
|
||||||
error!(?error, "Fatal error");
|
error!(?error, "Fatal error");
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue