diff options
author | HampusM <hampus@hampusmat.com> | 2023-05-14 16:58:44 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-05-14 16:58:44 +0200 |
commit | 1621882905b6bfd911e0b0ac8be5c369f2707b31 (patch) | |
tree | 87982771e80b0489266a209653eb182fcafda88a /src/attribute.rs | |
parent | 4d6664fb369607d42c269a8a50f26bfd3c3b8634 (diff) |
fix: allow a unsized key in the Attribute new function
Diffstat (limited to 'src/attribute.rs')
-rw-r--r-- | src/attribute.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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<Cow<'data, [u8]>>) -> Self + pub fn new( + key: &'data (impl AsRef<[u8]> + ?Sized), + value: impl Into<Cow<'data, [u8]>>, + ) -> Self { Self { inner: QuickXMLAttribute { |