From d95d9eef74b4190ed739fe9bb65e88c75b3a9a8c Mon Sep 17 00:00:00 2001 From: Mingun Date: Fri, 20 Sep 2024 22:22:08 +0500 Subject: [PATCH] Fix warning: elided lifetime has a name --> src\writer.rs:146:73 | 146 | pub fn create_element<'a, N>(&'a mut self, name: N) -> ElementWriter | -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default --- src/writer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/writer.rs b/src/writer.rs index 5e16590f..0f25e0cd 100644 --- a/src/writer.rs +++ b/src/writer.rs @@ -143,7 +143,7 @@ impl Writer { /// # } /// ``` #[must_use] - pub fn create_element<'a, N>(&'a mut self, name: N) -> ElementWriter + pub fn create_element<'a, N>(&'a mut self, name: N) -> ElementWriter<'a, W> where N: Into>, {