one day I'll be allowed to yield str refs

This commit is contained in:
Yehowshua Immanuel 2022-05-18 22:58:20 -04:00
parent 0497015783
commit 9c4ddffb42

View file

@ -22,7 +22,7 @@ struct Signal {
} }
#[generator(yield(String))] #[generator(yield(&str))]
fn yield_words(file : File) { fn yield_words(file : File) {
let mut reader = io::BufReader::new(file); let mut reader = io::BufReader::new(file);
@ -43,7 +43,7 @@ fn yield_words(file : File) {
let words = buffer.split_ascii_whitespace(); let words = buffer.split_ascii_whitespace();
for word in words { for word in words {
yield_!(word.to_string()); yield_!(word);
} }
buffer.clear(); buffer.clear();