diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-04-26 22:43:57 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-04-26 22:43:57 -0300 |
commit | b5b6d25d6ad1473128697e3c3bf09b441a65c359 (patch) | |
tree | 763f71427e4fa4d961c23dd256fdf99b31ad7c2a /src/lib.rs | |
parent | 073e7e952fbbb94ef4c4a69107f1f348496ac123 (diff) |
Wait for streaming/lending iterators.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs index cf04809..8f72571 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -379,8 +379,6 @@ mod valid_context { // available through get_info. list: ptr::null_mut(), _t: &CONTEXTS, - id: 0, - valid: Default::default(), }, _hidden: (), } @@ -1569,7 +1567,8 @@ impl<'a, 'ph: 'a> ValidContext<'a, 'ph> { /// /// fn print_contexts(ph: &mut PluginHandle<'_>) { /// ph.ensure_valid_context(|ph| { - /// for context in ph.list(&Contexts) { + /// let mut contexts = ph.list(&Contexts); + /// while let Some(context) = contexts.next() { /// write!(ph, "{}", context.name().unwrap()); /// } /// }) @@ -1585,7 +1584,6 @@ impl<'a, 'ph: 'a> ValidContext<'a, 'ph> { context: self.ph, list: list, t: t, - valid: Default::default(), } } |