Skip to content

Instantly share code, notes, and snippets.

@aliscco
Forked from rust-play/playground.rs
Created June 21, 2021 23:28
Show Gist options
  • Save aliscco/7cfe3455b1ce0e31a3523f7f5e519556 to your computer and use it in GitHub Desktop.
Save aliscco/7cfe3455b1ce0e31a3523f7f5e519556 to your computer and use it in GitHub Desktop.

Revisions

  1. @rust-play rust-play created this gist Jan 24, 2020.
    14 changes: 14 additions & 0 deletions playground.rs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    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])
    }