Skip to content

Commit 7d0dfac

Browse files
committed
refactor(bridge): rename into_dispatch_error to to_dispatch_error
Clarify that the method borrows self rather than consuming it.
1 parent b35f92b commit 7d0dfac

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

nodedb/src/bridge/envelope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ impl ErrorCode {
513513
/// code's real SQLSTATE. Codes with a dedicated `crate::Error` variant
514514
/// round-trip (e.g. `DivisionByZero` → `22012`); the rest keep the prior
515515
/// behavior of a `Dispatch` carrying the code's debug name.
516-
pub(crate) fn into_dispatch_error(&self) -> crate::Error {
516+
pub(crate) fn to_dispatch_error(&self) -> crate::Error {
517517
match self {
518518
ErrorCode::DivisionByZero => crate::Error::DivisionByZero,
519519
other => crate::Error::Dispatch {

nodedb/src/control/server/exchange/gather.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ pub(crate) async fn gather_all_cores(
230230
crate::bridge::envelope::ErrorCode::NotFound => continue,
231231
_ => {
232232
if first_error.is_none() {
233-
first_error = Some(ec.into_dispatch_error());
233+
first_error = Some(ec.to_dispatch_error());
234234
}
235235
}
236236
}

nodedb/src/control/server/exchange/owning_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub async fn gather_single_owning_core(
116116
{
117117
// Preserve typed codes (e.g. `DivisionByZero` → SQLSTATE 22012) instead
118118
// of collapsing every Data-Plane error to a generic `Dispatch` (XX000).
119-
return Err(ec.into_dispatch_error());
119+
return Err(ec.to_dispatch_error());
120120
}
121121

122122
let payload_bytes: &[u8] = resp.payload.as_ref();

0 commit comments

Comments
 (0)