We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b0cfa5 commit 3b6a5fbCopy full SHA for 3b6a5fb
src/test/ui/generator/issue-69039.rs
@@ -4,11 +4,15 @@
4
5
use std::ops::{Generator, GeneratorState};
6
7
+fn mkstr(my_name: String, my_mood: String) -> String {
8
+ format!("{} is {}", my_name.trim(), my_mood.trim())
9
+}
10
+
11
fn my_scenario() -> impl Generator<String, Yield = &'static str, Return = String> {
12
|_arg: String| {
13
let my_name = yield "What is your name?";
14
let my_mood = yield "How are you feeling?";
- format!("{} is {}", my_name.trim(), my_mood.trim())
15
+ mkstr(my_name, my_mood)
16
}
17
18
0 commit comments