extern crate generoust; use generoust::giver; #[giver] fn one() -> R where R: Iterator, { give!(1); } #[test] fn test_one() { assert_eq!(one().collect::>(), vec![1]); }