mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-09-20 06:46:17 +08:00
bumped rust
This commit is contained in:
parent
9bfaa3a7fd
commit
841bbe85da
|
@ -1 +1 @@
|
|||
nightly-2023-11-28
|
||||
nightly-2024-02-04
|
||||
|
|
|
@ -365,7 +365,7 @@ impl WarpgateConfig {
|
|||
|
||||
if let Some(request) = for_request {
|
||||
// 3: Host header in the request
|
||||
scheme = request.uri().scheme().map(Clone::clone).unwrap_or(scheme);
|
||||
scheme = request.uri().scheme().cloned().unwrap_or(scheme);
|
||||
|
||||
if let Some(host_header) = request.header(http::header::HOST).map(|x| x.to_string()) {
|
||||
if let Ok(host_port) = Url::parse(&format!("https://{host_header}/")) {
|
||||
|
|
|
@ -244,7 +244,7 @@ impl ServerSession {
|
|||
self.auth_state = Some(state);
|
||||
}
|
||||
#[allow(clippy::unwrap_used)]
|
||||
Ok(self.auth_state.as_ref().map(Clone::clone).unwrap())
|
||||
Ok(self.auth_state.as_ref().cloned().unwrap())
|
||||
}
|
||||
|
||||
pub fn make_logging_span(&self) -> tracing::Span {
|
||||
|
|
|
@ -33,7 +33,5 @@ pub fn lookup_built_file(source: &str) -> Result<ManifestEntry, LookupError> {
|
|||
|
||||
let obj: HashMap<String, ManifestEntry> = serde_json::from_slice(&file.data)?;
|
||||
|
||||
obj.get(source)
|
||||
.map(Clone::clone)
|
||||
.ok_or(LookupError::FileNotFound)
|
||||
obj.get(source).cloned().ok_or(LookupError::FileNotFound)
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ use uuid::Uuid;
|
|||
use warpgate_common::helpers::fs::{secure_directory, secure_file};
|
||||
use warpgate_common::helpers::hash::hash_password;
|
||||
use warpgate_common::{
|
||||
HttpConfig, ListenEndpoint, MySqlConfig, SshConfig, Secret, UserAuthCredential,
|
||||
HttpConfig, ListenEndpoint, MySqlConfig, Secret, SshConfig, UserAuthCredential,
|
||||
UserPasswordCredential, UserRequireCredentialsPolicy, WarpgateConfigStore, WarpgateError,
|
||||
};
|
||||
use warpgate_core::consts::{BUILTIN_ADMIN_ROLE_NAME, BUILTIN_ADMIN_USERNAME};
|
||||
|
|
|
@ -17,7 +17,7 @@ pub(crate) async fn command(cli: &crate::Cli, target_name: &String) -> Result<()
|
|||
.await?
|
||||
.iter()
|
||||
.find(|x| &x.name == target_name)
|
||||
.map(Target::clone)
|
||||
.cloned()
|
||||
else {
|
||||
error!("Target not found: {}", target_name);
|
||||
return Ok(());
|
||||
|
|
Loading…
Reference in a new issue