Skip to content

Instantly share code, notes, and snippets.

@Endermanbugzjfc
Forked from rust-play/playground.rs
Created February 27, 2024 01:47
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 Endermanbugzjfc/b8f4ab28e33e214507d8caf79b9f815e to your computer and use it in GitHub Desktop.
Save Endermanbugzjfc/b8f4ab28e33e214507d8caf79b9f815e to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn mock<T: Into<String>, I: IntoIterator<Item = T>>(_: I) {}
struct Merchant<'a> {
name: &'a str,
billing_portal: &'a str,
billing_period: &'a str,
stripe_id: Option<&'a str>,
}
fn merchant() -> Merchant { unimplemented!(); }
fn run() {
let merch = merchant();
mock(&[&merch.name, &merch.billing_portal, &merch.billing_period, &merch.stripe_id])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment