Skip to content

Instantly share code, notes, and snippets.

@Cerber-Ursi
Cerber-Ursi / playground.rs
Last active September 22, 2019 05:15 — forked from rust-play/playground.rs
Code shared from the Rust Playground
#![allow(dead_code)]
#![allow(unused_variables)]
mod naive {
fn foo(x: &[i32], y: i32) -> Option<usize> {
super::real_impl::find(x, y)
}
#[test]
@Cerber-Ursi
Cerber-Ursi / playground.rs
Created October 3, 2019 07:54 — forked from rust-play/playground.rs
Code shared from the Rust Playground
macro_rules! commands {
(
($cmd_enum:ident, $results_mod:ident, $ret_enum:ident),
$(
$cmd:ident -> $(
$res:ident $(
($($inner:ty),+)
)?
)|+
),+
export class InitEventArgs {};
export class ResetEventArgs {};
export class ItemsChangedEventArgs {
public added: ReadonlyArray<any>;
public removed: ReadonlyArray<any>;
constructor(added?: ReadonlyArray<any>, removed?: ReadonlyArray<any>) {
this.added = added || [];
this.removed = removed || [];