diff --git a/Cargo.toml b/Cargo.toml index b61ca01..85d95ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "alkcall" version = "0.7.0" edition = "2021" -rust-version = "1.85" +rust-version = "1.88" license = "MIT OR Apache-2.0" description = "Call + channels RPC: structured JSON operations, streaming subscriptions, service discovery, and N-channel multiplexing over one transport stream" readme = "README.md" diff --git a/src/channels/mux.rs b/src/channels/mux.rs index 07c8716..5a022c9 100644 --- a/src/channels/mux.rs +++ b/src/channels/mux.rs @@ -151,18 +151,15 @@ impl MuxRunner { ); } break; - } else { - if let Err(e) = - super::wire::write_chunk(&mut *writer, channel_id, &payload) - .await - { - tracing::warn!( - channel_id, - error = %e, - "mux pump: failed to write chunk" - ); - break; - } + } else if let Err(e) = + super::wire::write_chunk(&mut *writer, channel_id, &payload).await + { + tracing::warn!( + channel_id, + error = %e, + "mux pump: failed to write chunk" + ); + break; } } None => { diff --git a/src/core/types.rs b/src/core/types.rs index 6bb18a3..d4632c3 100644 --- a/src/core/types.rs +++ b/src/core/types.rs @@ -749,7 +749,7 @@ mod tests { #[test] fn capabilities_debug_redacts_entries() { let caps = Capabilities::new().with_api_key("google", "sekrit".to_string()); - let s = format!("{:?}", caps); + let s = format!("{caps:?}"); assert!(s.contains("redacted")); assert!(!s.contains("sekrit")); } @@ -757,7 +757,7 @@ mod tests { #[test] fn secret_debug_redacts() { let secret = Secret::new("hidden".to_string()); - assert_eq!(format!("{:?}", secret), "[REDACTED]"); + assert_eq!(format!("{secret:?}"), "[REDACTED]"); } #[test] diff --git a/src/registry/registration.rs b/src/registry/registration.rs index 97580de..f964088 100644 --- a/src/registry/registration.rs +++ b/src/registry/registration.rs @@ -807,13 +807,13 @@ pub(crate) fn extract_json_pointer(input: &Value, path: &str) -> Option return None; } let pointer = if let Some(rest) = trimmed.strip_prefix('/') { - format!("/{}", rest) + format!("/{rest}") } else { let dotted = trimmed.replace('.', "/"); if let Some(rest) = dotted.strip_prefix('/') { - format!("/{}", rest) + format!("/{rest}") } else { - format!("/{}", dotted) + format!("/{dotted}") } }; input