Skip to content

Instantly share code, notes, and snippets.

@brigand
Created June 21, 2021 22:53
Show Gist options
  • Save brigand/09338149abc3f78e0f469d970b7bcfb4 to your computer and use it in GitHub Desktop.
Save brigand/09338149abc3f78e0f469d970b7bcfb4 to your computer and use it in GitHub Desktop.
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