Skip to content

Instantly share code, notes, and snippets.

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