Skip to content

Instantly share code, notes, and snippets.

@brigand
Created Jun 21, 2021
Embed
What would you like to do?
fn greet(name: &str) -> String {
if name.is_empty() {
format!("Hello, {}", "whoever")
} else {
format!("Hello, {}", name)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment