// ANCHOR: here
fn main() {
let string1 = String::from("long string is long");
-
+ let result;
{
let string2 = String::from("xyz");
- let result = longest(string1.as_str(), string2.as_str());
- println!("The longest string is {}", result);
+ result = longest(string1.as_str(), string2.as_str());
}
+ println!("The longest string is {}", result);
}
// ANCHOR_END: here