Make `debug_name()` on simple `Identifier` items (Enum, TypeAlias) a fast Rc clone.
PiperOrigin-RevId: 524105545
diff --git a/rs_bindings_from_cc/ir.rs b/rs_bindings_from_cc/ir.rs
index 290eb55..245d576 100644
--- a/rs_bindings_from_cc/ir.rs
+++ b/rs_bindings_from_cc/ir.rs
@@ -614,7 +614,7 @@
self.id
}
fn debug_name(&self, _: &IR) -> Rc<str> {
- self.identifier.to_string().into()
+ self.identifier.identifier.clone()
}
fn source_loc(&self) -> Option<Rc<str>> {
Some(self.source_loc.clone())
@@ -646,7 +646,7 @@
self.id
}
fn debug_name(&self, _: &IR) -> Rc<str> {
- self.identifier.to_string().into()
+ self.identifier.identifier.clone()
}
fn source_loc(&self) -> Option<Rc<str>> {
Some(self.source_loc.clone())