rustfmt: collapse short multi-line expressions in ntlm tests
rust / build / test / clippy / fmt (push) Has been cancelled
rust / build / test / clippy / fmt (push) Has been cancelled
Pure whitespace cleanup from running `cargo fmt --all` between iterations; no semantic change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1254,10 +1254,7 @@ mod tests {
|
||||
// Acquire before snapshotting so a concurrent test can't
|
||||
// mutate vars between our snapshot and restore.
|
||||
let guard = ENV_LOCK.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let snapshots = names
|
||||
.iter()
|
||||
.map(|n| (*n, std::env::var(n).ok()))
|
||||
.collect();
|
||||
let snapshots = names.iter().map(|n| (*n, std::env::var(n).ok())).collect();
|
||||
Self {
|
||||
snapshots,
|
||||
_guard: guard,
|
||||
@@ -1323,8 +1320,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn from_env_missing_user_errors() {
|
||||
let _scope =
|
||||
EnvScope::capture(&["MX_RPC_USER", "MX_RPC_PASSWORD", "MX_RPC_DOMAIN"]);
|
||||
let _scope = EnvScope::capture(&["MX_RPC_USER", "MX_RPC_PASSWORD", "MX_RPC_DOMAIN"]);
|
||||
unset_env("MX_RPC_USER");
|
||||
set_env("MX_RPC_PASSWORD", "p");
|
||||
set_env("MX_RPC_DOMAIN", "d");
|
||||
@@ -1337,8 +1333,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn from_env_missing_password_errors() {
|
||||
let _scope =
|
||||
EnvScope::capture(&["MX_RPC_USER", "MX_RPC_PASSWORD", "MX_RPC_DOMAIN"]);
|
||||
let _scope = EnvScope::capture(&["MX_RPC_USER", "MX_RPC_PASSWORD", "MX_RPC_DOMAIN"]);
|
||||
set_env("MX_RPC_USER", "u");
|
||||
unset_env("MX_RPC_PASSWORD");
|
||||
set_env("MX_RPC_DOMAIN", "d");
|
||||
@@ -1353,8 +1348,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn from_env_missing_domain_errors() {
|
||||
let _scope =
|
||||
EnvScope::capture(&["MX_RPC_USER", "MX_RPC_PASSWORD", "MX_RPC_DOMAIN"]);
|
||||
let _scope = EnvScope::capture(&["MX_RPC_USER", "MX_RPC_PASSWORD", "MX_RPC_DOMAIN"]);
|
||||
set_env("MX_RPC_USER", "u");
|
||||
set_env("MX_RPC_PASSWORD", "p");
|
||||
unset_env("MX_RPC_DOMAIN");
|
||||
|
||||
Reference in New Issue
Block a user