diff --git a/zeroconf/src/macos/txt_record.rs b/zeroconf/src/macos/txt_record.rs index b90a1a6..f3d3b01 100644 --- a/zeroconf/src/macos/txt_record.rs +++ b/zeroconf/src/macos/txt_record.rs @@ -73,17 +73,17 @@ impl BonjourTxtRecord { } /// Returns a new `txt_record::Iter` for iterating over the record as you would a `HashMap`. - pub fn iter(&self) -> Box { + pub fn iter<'a>(&'a self) -> Box + 'a> { Box::new(Iter::new(self)) } /// Returns a new `txt_record::Iter` over the records keys. - pub fn keys(&self) -> Box { + pub fn keys<'a>(&'a self) -> Box + 'a> { Box::new(Keys(Iter::new(self))) } /// Returns a new `txt_record::Iter` over the records values. - pub fn values(&self) -> Box { + pub fn values<'a>(&'a self) -> Box + 'a> { Box::new(Values(Iter::new(self))) } diff --git a/zeroconf/src/txt_record.rs b/zeroconf/src/txt_record.rs index 8eba15d..b08adb7 100644 --- a/zeroconf/src/txt_record.rs +++ b/zeroconf/src/txt_record.rs @@ -1,10 +1,6 @@ use crate::TxtRecord; use std::ops::Index; -pub type Iter<'a> = dyn Iterator; -pub type Keys<'a> = dyn Iterator; -pub type Values<'a> = dyn Iterator; - impl Index<&str> for TxtRecord { type Output = str;