From 4d7b942b7555b2c334a45b05cd0ee074cf9fa0e1 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Tue, 17 Feb 2026 23:24:27 +0100 Subject: [PATCH] remote-helper: Rename `to_branch_name` Since `to_branch_name` consumes `self`, it should better be called `into_branch_name`. See also . --- crates/radicle-remote-helper/src/main.rs | 2 +- crates/radicle-remote-helper/src/push.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/radicle-remote-helper/src/main.rs b/crates/radicle-remote-helper/src/main.rs index 6bbc22a3..86defaf9 100644 --- a/crates/radicle-remote-helper/src/main.rs +++ b/crates/radicle-remote-helper/src/main.rs @@ -176,7 +176,7 @@ enum Branch { impl Branch { /// Return the branch name to be used for the local branch when creating a /// patch. - fn to_branch_name(self, object: &radicle::patch::PatchId) -> Option> { + fn into_branch_name(self, object: &radicle::patch::PatchId) -> Option> { match self { Self::None => None, Self::MirrorUpstream => Some(git::refs::patch(object)), diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs index 527da28c..953513b0 100644 --- a/crates/radicle-remote-helper/src/push.rs +++ b/crates/radicle-remote-helper/src/push.rs @@ -637,7 +637,7 @@ where )?; if let Some(upstream) = upstream { - if let Some(local_branch) = opts.branch.to_branch_name(&patch) { + if let Some(local_branch) = opts.branch.into_branch_name(&patch) { fn strip_refs_heads(qualified: git::fmt::Qualified) -> git::fmt::RefString { let (_refs, _heads, x, xs) = qualified.non_empty_components(); std::iter::once(x).chain(xs).collect()