Browse Source

Loosen lifetime on `Memory.regions`

The current lifetime suggests that the returned iterator references
the `Memory` itself, but it only references the `Fdt`.
Sven Bartscher 2 years ago
parent
commit
e8d7f71931
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/standard_nodes.rs

+ 2 - 2
src/standard_nodes.rs

@@ -250,9 +250,9 @@ pub struct Memory<'b, 'a: 'b> {
     pub(crate) node: FdtNode<'b, 'a>,
 }
 
-impl Memory<'_, '_> {
+impl<'a> Memory<'_, 'a> {
     /// Returns an iterator over all of the available memory regions
-    pub fn regions(&self) -> impl Iterator<Item = MemoryRegion> + '_ {
+    pub fn regions(&self) -> impl Iterator<Item = MemoryRegion> + 'a {
         self.node.reg().unwrap()
     }