Skip to content

Commit

Permalink
bumped rust
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Jul 10, 2024
1 parent 9bfaa3a commit 841bbe8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-11-28
nightly-2024-02-04
2 changes: 1 addition & 1 deletion warpgate-common/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}/")) {
Expand Down
2 changes: 1 addition & 1 deletion warpgate-protocol-ssh/src/server/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions warpgate-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion warpgate/src/commands/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion warpgate/src/commands/test_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(());
Expand Down

0 comments on commit 841bbe8

Please sign in to comment.