Skip to content

Commit 43d86cd

Browse files
ishaileshpantclaude
andcommitted
style: cargo fmt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5316ed8 commit 43d86cd

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/server/mod.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ impl AsyncWrite for CrlTlsStream {
7272
Pin::new(&mut self.inner).poll_flush(cx)
7373
}
7474

75-
fn poll_shutdown(
76-
mut self: Pin<&mut Self>,
77-
cx: &mut Context<'_>,
78-
) -> Poll<std::io::Result<()>> {
75+
fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> {
7976
Pin::new(&mut self.inner).poll_shutdown(cx)
8077
}
8178
}
@@ -141,7 +138,9 @@ fn build_crl_tls_acceptor(
141138
.unwrap_or_default();
142139
if crls.is_empty() {
143140
// Not PEM — treat the whole file as a single DER-encoded CRL
144-
crls.push(rustls::pki_types::CertificateRevocationListDer::from(crl_bytes));
141+
crls.push(rustls::pki_types::CertificateRevocationListDer::from(
142+
crl_bytes,
143+
));
145144
}
146145

147146
info!(
@@ -389,8 +388,7 @@ impl RusdServer {
389388
// Generate deterministic member and cluster IDs matching etcd v3.5.x's algorithm.
390389
// member_id = SHA-1(sorted_peer_urls + cluster_token) → first 8 bytes big-endian u64
391390
// cluster_id = SHA-1(sorted_member_ids) → first 8 bytes big-endian u64
392-
let local_peer_urls =
393-
extract_member_peer_urls(&config.initial_cluster, &config.name);
391+
let local_peer_urls = extract_member_peer_urls(&config.initial_cluster, &config.name);
394392
let member_id = compute_member_id(&local_peer_urls, &config.initial_cluster_token);
395393

396394
// Compute all member IDs for the initial cluster to derive cluster_id
@@ -542,7 +540,11 @@ impl RusdServer {
542540
// 4. Initialize Cluster manager
543541
let cluster_mgr = ClusterManager::new(cluster_id, member_id)
544542
.map_err(|e| anyhow::anyhow!("Failed to initialize cluster manager: {}", e))?;
545-
register_initial_members(&cluster_mgr, &config.initial_cluster, &config.initial_cluster_token)?;
543+
register_initial_members(
544+
&cluster_mgr,
545+
&config.initial_cluster,
546+
&config.initial_cluster_token,
547+
)?;
546548
info!(
547549
initial_cluster = %config.initial_cluster,
548550
"Cluster configuration parsed"
@@ -830,7 +832,9 @@ impl RusdServer {
830832
});
831833

832834
let incoming = tokio_stream::wrappers::ReceiverStream::new(rx);
833-
router.serve_with_incoming_shutdown(incoming, shutdown).await?;
835+
router
836+
.serve_with_incoming_shutdown(incoming, shutdown)
837+
.await?;
834838
} else {
835839
router.serve_with_shutdown(addr, shutdown).await?;
836840
}

0 commit comments

Comments
 (0)