You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by kr...@apache.org on 2026/02/25 20:59:22 UTC
(avro-rs) 02/07: fix!: `Alias::name` and `Alias::namespace` should return references, user can clone if needed
This is an automated email from the ASF dual-hosted git repository.
kriskras99 pushed a commit to branch fix/small_things
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit 4e9ae8981bf5772d119fc6eeb131f369a1015594
Author: Kriskras99 <gi...@kriskras99.nl>
AuthorDate: Wed Feb 25 21:31:01 2026 +0100
fix!: `Alias::name` and `Alias::namespace` should return references, user can clone if needed
---
avro/src/schema/name.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/avro/src/schema/name.rs b/avro/src/schema/name.rs
index e572d8b..b551584 100644
--- a/avro/src/schema/name.rs
+++ b/avro/src/schema/name.rs
@@ -202,12 +202,12 @@ impl Alias {
Name::new(name).map(Self)
}
- pub fn name(&self) -> String {
- self.0.name.clone()
+ pub fn name(&self) -> &str {
+ &self.0.name
}
- pub fn namespace(&self) -> Namespace {
- self.0.namespace.clone()
+ pub fn namespace(&self) -> &Namespace {
+ &self.0.namespace
}
pub fn fullname(&self, default_namespace: Namespace) -> String {