From b5b6d25d6ad1473128697e3c3bf09b441a65c359 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Tue, 26 Apr 2022 22:43:57 -0300 Subject: Wait for streaming/lending iterators. --- src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib.rs') 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(), } } -- cgit 1.4.1