Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. struct Foo(std::vec::Vec<u8>);
  2. struct Bar<'foo> {
  3. foo: &'foo Foo,
  4. iter: std::slice::Iter<'foo, u8>,
  5. }
  6.  
  7. impl Foo {
  8. fn iter<'foo>(&'foo self) -> Bar<'foo> {
  9. Bar {
  10. foo: self,
  11. iter: self.0.iter(),
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement