From 1621882905b6bfd911e0b0ac8be5c369f2707b31 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 14 May 2023 16:58:44 +0200 Subject: fix: allow a unsized key in the Attribute new function --- src/attribute.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/attribute.rs') diff --git a/src/attribute.rs b/src/attribute.rs index 3d17fe9..f250f67 100644 --- a/src/attribute.rs +++ b/src/attribute.rs @@ -23,7 +23,10 @@ pub struct Attribute<'data> impl<'data> Attribute<'data> { /// Returns a new `Attribute`. - pub fn new(key: &'data impl AsRef<[u8]>, value: impl Into>) -> Self + pub fn new( + key: &'data (impl AsRef<[u8]> + ?Sized), + value: impl Into>, + ) -> Self { Self { inner: QuickXMLAttribute { -- cgit v1.2.3-18-g5258