Procházet zdrojové kódy

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 před 2 roky
rodič
revize
e8d7f71931
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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()
     }