refactor: clean up code and improve compatibility
- Added conditional compilation for Unix environments in the SSH agent module. - Removed an unused warning comment in the ironrdp-connector. - Simplified import statements in the picky signature module. - Streamlined the build script for zmodem2 by removing unnecessary warning messages.
This commit is contained in:
1 parent
a7967fa52d
commit
9e745dd0fc
4 files changed
+4
-5
No files matched your search
@@ -10,6 +10,7 @@ use crate::error::{AppError, AppResult};
|
||||
use russh::keys::agent::client::{AgentClient, AgentStream};
|
||||
#[cfg(windows)]
|
||||
use std::ffi::OsStr;
|
||||
#[cfg(unix)]
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -171,6 +172,7 @@ async fn connect_pageant() -> AppResult<DynamicAgentStream> {
|
||||
Ok(client.into_inner())
|
||||
}
|
||||
|
||||
#[cfg(any(unix, test))]
|
||||
fn normalize_environment_variable(value: &str) -> AppResult<&str> {
|
||||
let variable = value.trim().trim_start_matches('$').trim();
|
||||
if variable.is_empty() {
|
||||
|
||||
@@ -772,7 +772,6 @@ fn respond_to_connect_time_autodetect(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(single_use_lifetimes)] // anonymous lifetimes in `impl Trait` are unstable
|
||||
fn create_gcc_blocks<'a>(
|
||||
config: &Config,
|
||||
selected_protocol: nego::SecurityProtocol,
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ use crate::key::ec::{EcComponent, EcCurve, NamedEcCurve};
|
||||
use crate::key::{KeyError, PrivateKey, PublicKey};
|
||||
|
||||
use picky_asn1_x509::{AlgorithmIdentifier, oids};
|
||||
use rsa::signature::{SignatureEncoding as _, Signer};
|
||||
use rsa::signature::Signer;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
Vendored
+1
-3
@@ -17,9 +17,7 @@ fn main() {
|
||||
println!("cargo:rustc-env=ZMODEM_RZ_BIN={}", rz_path.display());
|
||||
println!("cargo:rustc-env=ZMODEM_SZ_BIN={}", sz_path.display());
|
||||
}
|
||||
_ => {
|
||||
println!("cargo:warning=lrzsz not found");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user