From 742370bc6e18b1e3e3b42eee4fc5367dc336b785 Mon Sep 17 00:00:00 2001 From: Truman Kilen Date: Mon, 22 Dec 2025 15:37:39 -0600 Subject: Fix QualifiedName::default() incorrectly creating QualifiedName with empty separator --- rust/src/qualified_name.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'rust/src') diff --git a/rust/src/qualified_name.rs b/rust/src/qualified_name.rs index fc362cf6..62da86b8 100644 --- a/rust/src/qualified_name.rs +++ b/rust/src/qualified_name.rs @@ -35,7 +35,7 @@ use std::ops::{Index, IndexMut}; /// let qn = QualifiedName::new_with_separator(["a", "b", "c"], "."); /// assert_eq!(qn.to_string(), "a.b.c"); /// ``` -#[derive(Default, Debug, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)] +#[derive(Debug, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)] pub struct QualifiedName { // TODO: Make this Option where default is "::". pub separator: String, @@ -177,6 +177,12 @@ impl QualifiedName { } } +impl Default for QualifiedName { + fn default() -> Self { + Self::new(Vec::::new()) + } +} + impl From for QualifiedName { fn from(value: String) -> Self { Self { -- cgit v1.3.1