1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
From afb6070deb28f01fd43462f45c40688bbd058cbc Mon Sep 17 00:00:00 2001
From: Ivan Shapovalov <intelfx@intelfx.name>
Date: Fri, 16 Jan 2026 05:31:53 +0100
Subject: [PATCH 2/5] git-ref-format: fix macros for !debug_assertions
---
crates/radicle-git-ref-format/src/lib.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/crates/radicle-git-ref-format/src/lib.rs b/crates/radicle-git-ref-format/src/lib.rs
index e7df4b25..5eb6eefb 100644
--- a/crates/radicle-git-ref-format/src/lib.rs
+++ b/crates/radicle-git-ref-format/src/lib.rs
@@ -52,6 +52,7 @@ macro_rules! refname {
extern crate alloc;
use alloc::string::String;
+ use alloc::borrow::ToOwned;
let s: String = $arg.to_owned();
unsafe { core::mem::transmute::<_, RefString>(s) }
@@ -85,7 +86,7 @@ macro_rules! qualified {
use core::mem::transmute;
- use alloc::borrow::Cow;
+ use alloc::borrow::{Cow, ToOwned};
use alloc::string::String;
use $crate::{RefStr, RefString};
@@ -126,7 +127,7 @@ macro_rules! component {
use core::mem::transmute;
- use alloc::borrow::Cow;
+ use alloc::borrow::{Cow, ToOwned};
use alloc::string::String;
use $crate::{RefStr, RefString};
@@ -166,6 +167,7 @@ macro_rules! pattern {
extern crate alloc;
use alloc::string::String;
+ use alloc::borrow::ToOwned;
let s: String = $arg.to_owned();
unsafe { core::mem::transmute::<_, PatternString>(s) }
@@ -209,7 +211,7 @@ macro_rules! qualified_pattern {
use core::mem::transmute;
- use alloc::borrow::Cow;
+ use alloc::borrow::{Cow, ToOwned};
use alloc::string::String;
use $crate::refspec::{PatternStr, PatternString};
--
2.53.0.8.g57fba0c4633
|