diff --git a/trait-variant/examples/variant.rs b/trait-variant/examples/variant.rs index f175bb7..04bcc6a 100644 --- a/trait-variant/examples/variant.rs +++ b/trait-variant/examples/variant.rs @@ -6,7 +6,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::{future::Future, ops::Add}; +use std::{fmt::Display, future::Future}; #[trait_variant::make(IntFactory: Send)] pub trait LocalIntFactory { @@ -37,9 +37,10 @@ where const CONST: usize = 3; type F; type A; - type B: Add; + type B: FromIterator; async fn take(&self, s: S); + fn build(&self, items: impl Iterator) -> Self::B; } fn main() {}