Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
250611.0
250612.0
2 changes: 1 addition & 1 deletion crates/pulse_monitor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub mod transport;

// Note: Requires a stream that would immediately yield the initial cluster
// state.
pub async fn run<C>(mut cluster_stream: C)
pub async fn run<C>(cluster_stream: C)

Copilot AI Jun 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the mutable binding for cluster_stream improves clarity; verify that mutable access is not required within the function.

Copilot uses AI. Check for mistakes.
where
C: Stream<Item = Arc<domain::Cluster>>,
{
Expand Down
3 changes: 0 additions & 3 deletions crates/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ pub struct Error {
}

impl Error {
#[cfg(feature = "server")]
const THROTTLED: Self = Self::new(error_code::THROTTLED);

/// Creates a new RPC error with the provided error code.
pub const fn new(code: &'static str) -> Self {
Self {
Expand Down
10 changes: 1 addition & 9 deletions crates/rpc/src/quic/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use {
},
derive_more::derive::Deref,
filter::{Filter, Permit, RejectionReason},
futures::{FutureExt, SinkExt as _, TryFutureExt as _},
futures::TryFutureExt as _,
libp2p::{identity::Keypair, Multiaddr},
quinn::crypto::rustls::QuicServerConfig,
std::{future::Future, io, net::SocketAddr, sync::Arc, time::Duration},
Expand Down Expand Up @@ -218,14 +218,6 @@ where
let (tx, mut rx) = conn.accept_bi().await?;

let Some(stream_permit) = self.acquire_stream_permit() else {
static THROTTLED_RESULT: &crate::Result<()> = &Err(crate::Error::THROTTLED);

let (_, mut tx) =
BiDirectionalStream::new(tx, rx).upgrade::<(), crate::Result<()>, R::Codec>();

// The send buffer is large enough to write the whole response.
tx.send(THROTTLED_RESULT).now_or_never();

continue;
};

Expand Down
Loading