Fix 'elided lifetime' warning from nightly
Nightly 1.90. The fix passes on stable 1.88. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
bdae845b14
commit
02a70edf99
4 changed files with 14 additions and 11 deletions
|
|
@ -2,6 +2,8 @@ Version NEXT:
|
||||||
* Changes
|
* Changes
|
||||||
* Almost make the whole crate `no_std`, only `std::io` is still remaining.
|
* Almost make the whole crate `no_std`, only `std::io` is still remaining.
|
||||||
* Update rxml dependency to 0.13.
|
* Update rxml dependency to 0.13.
|
||||||
|
* Fixes
|
||||||
|
* Remove warnings for elided lifetimes (rustc 1.90)
|
||||||
|
|
||||||
Version 0.16, released 2024-07-23:
|
Version 0.16, released 2024-07-23:
|
||||||
* Breaking
|
* Breaking
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ pub type ItemWriter<W> = CustomItemWriter<W, rxml::writer::SimpleNamespaces>;
|
||||||
/// xml special characters (<, >, &, ', ") with their corresponding
|
/// xml special characters (<, >, &, ', ") with their corresponding
|
||||||
/// xml escaped value.
|
/// xml escaped value.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn escape(raw: &[u8]) -> Cow<[u8]> {
|
pub fn escape(raw: &[u8]) -> Cow<'_, [u8]> {
|
||||||
fn to_escape(b: u8) -> bool {
|
fn to_escape(b: u8) -> bool {
|
||||||
matches!(b, b'<' | b'>' | b'\'' | b'&' | b'"')
|
matches!(b, b'<' | b'>' | b'\'' | b'&' | b'"')
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +264,7 @@ impl Element {
|
||||||
/// assert_eq!(iter.next(), None);
|
/// assert_eq!(iter.next(), None);
|
||||||
/// ```
|
/// ```
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn attrs(&self) -> Attrs {
|
pub fn attrs(&self) -> Attrs<'_> {
|
||||||
Attrs {
|
Attrs {
|
||||||
iter: self.attributes.iter(),
|
iter: self.attributes.iter(),
|
||||||
}
|
}
|
||||||
|
|
@ -273,7 +273,7 @@ impl Element {
|
||||||
/// Returns an iterator over the attributes of this element, with the value being a mutable
|
/// Returns an iterator over the attributes of this element, with the value being a mutable
|
||||||
/// reference.
|
/// reference.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn attrs_mut(&mut self) -> AttrsMut {
|
pub fn attrs_mut(&mut self) -> AttrsMut<'_> {
|
||||||
AttrsMut {
|
AttrsMut {
|
||||||
iter: self.attributes.iter_mut(),
|
iter: self.attributes.iter_mut(),
|
||||||
}
|
}
|
||||||
|
|
@ -457,13 +457,13 @@ impl Element {
|
||||||
/// assert_eq!(iter.next(), None);
|
/// assert_eq!(iter.next(), None);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn nodes(&self) -> Nodes {
|
pub fn nodes(&self) -> Nodes<'_> {
|
||||||
self.children.iter()
|
self.children.iter()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns an iterator over mutable references to every child node of this element.
|
/// Returns an iterator over mutable references to every child node of this element.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn nodes_mut(&mut self) -> NodesMut {
|
pub fn nodes_mut(&mut self) -> NodesMut<'_> {
|
||||||
self.children.iter_mut()
|
self.children.iter_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -484,7 +484,7 @@ impl Element {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn children(&self) -> Children {
|
pub fn children(&self) -> Children<'_> {
|
||||||
Children {
|
Children {
|
||||||
iter: self.children.iter(),
|
iter: self.children.iter(),
|
||||||
}
|
}
|
||||||
|
|
@ -493,7 +493,7 @@ impl Element {
|
||||||
/// Returns an iterator over mutable references to every child element of this element.
|
/// Returns an iterator over mutable references to every child element of this element.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn children_mut(&mut self) -> ChildrenMut {
|
pub fn children_mut(&mut self) -> ChildrenMut<'_> {
|
||||||
ChildrenMut {
|
ChildrenMut {
|
||||||
iter: self.children.iter_mut(),
|
iter: self.children.iter_mut(),
|
||||||
}
|
}
|
||||||
|
|
@ -509,7 +509,7 @@ impl Element {
|
||||||
/// remove text nodes.
|
/// remove text nodes.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub fn take_contents_as_children(&mut self) -> ContentsAsChildren {
|
pub fn take_contents_as_children(&mut self) -> ContentsAsChildren<'_> {
|
||||||
ContentsAsChildren {
|
ContentsAsChildren {
|
||||||
iter: self.children.drain(..),
|
iter: self.children.drain(..),
|
||||||
}
|
}
|
||||||
|
|
@ -531,7 +531,7 @@ impl Element {
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn texts(&self) -> Texts {
|
pub fn texts(&self) -> Texts<'_> {
|
||||||
Texts {
|
Texts {
|
||||||
iter: self.children.iter(),
|
iter: self.children.iter(),
|
||||||
}
|
}
|
||||||
|
|
@ -540,7 +540,7 @@ impl Element {
|
||||||
/// Returns an iterator over mutable references to every text node of this element.
|
/// Returns an iterator over mutable references to every text node of this element.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn texts_mut(&mut self) -> TextsMut {
|
pub fn texts_mut(&mut self) -> TextsMut<'_> {
|
||||||
TextsMut {
|
TextsMut {
|
||||||
iter: self.children.iter_mut(),
|
iter: self.children.iter_mut(),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ XXXX-YY-ZZ RELEASER <admin@example.com>
|
||||||
on the `tls-rust-ktls` feature. (!458, !490)
|
on the `tls-rust-ktls` feature. (!458, !490)
|
||||||
- Building with insecure-tcp and no other feature got fixed.
|
- Building with insecure-tcp and no other feature got fixed.
|
||||||
- Update rxml dependency to 0.13.
|
- Update rxml dependency to 0.13.
|
||||||
|
- Remove warnings for elided lifetimes (rustc 1.90)
|
||||||
|
|
||||||
Version 4.0.0:
|
Version 4.0.0:
|
||||||
2024-07-26 Maxime “pep” Buquet <pep@bouah.net>
|
2024-07-26 Maxime “pep” Buquet <pep@bouah.net>
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ impl WorkerStream {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn close(&mut self) -> Close {
|
fn close(&mut self) -> Close<'_> {
|
||||||
Close {
|
Close {
|
||||||
stream: Pin::new(self),
|
stream: Pin::new(self),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue