From 19b0f3989e8f6dae4b592ea3f01291557759f206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 14 Nov 2021 01:45:43 +0100 Subject: [PATCH] pkstrings: Allow consuming and converting to String MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- pkstrings/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkstrings/src/lib.rs b/pkstrings/src/lib.rs index 059694e..ef14f2d 100644 --- a/pkstrings/src/lib.rs +++ b/pkstrings/src/lib.rs @@ -102,6 +102,12 @@ impl fmt::Display for Error { #[derive(Debug, Clone, Eq, PartialEq)] pub struct PKString(String); +impl PKString { + pub fn into_string(self) -> String { + self.0 + } +} + impl Deref for PKString { type Target = String;