Skip to content

Instantly share code, notes, and snippets.

@berkes
Created October 4, 2022 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berkes/793359fc7890fd58bb6c532a5919c4cf to your computer and use it in GitHub Desktop.
Save berkes/793359fc7890fd58bb6c532a5919c4cf to your computer and use it in GitHub Desktop.
Using Email Eq.
fn make_and_send_report(to: EmailAddress, pages: Vec<PageRequest>) {
if to == EmailAddress::new("john@example.com".to_string()).expect("valid email") {
return;
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment