This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Clone, Copy)] | |
struct Op(fn(u16, u16)); | |
// lets you call foo() instead of foo.0() (where foo: Op) | |
impl std::ops::Deref for Op { | |
type Target = fn(u16, u16); | |
fn deref(&self) -> &fn(u16, u16) { &self.0 } | |
} | |
fn op_mov(one: u16, two: u16) { |