From 3daf9aaeb3219b497fc2f73e429084eedf28cf94 Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Thu, 16 May 2024 10:13:12 +0200 Subject: [PATCH] chore: allow turning a normalized string into a string Signed-off-by: Jens Reimann --- cyclonedx-bom/src/external_models/normalized_string.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cyclonedx-bom/src/external_models/normalized_string.rs b/cyclonedx-bom/src/external_models/normalized_string.rs index ec57e0f7..50efde2d 100644 --- a/cyclonedx-bom/src/external_models/normalized_string.rs +++ b/cyclonedx-bom/src/external_models/normalized_string.rs @@ -51,6 +51,12 @@ impl From<&str> for NormalizedString { } } +impl From for String { + fn from(value: NormalizedString) -> Self { + value.0 + } +} + impl Deref for NormalizedString { type Target = str;