Skip to content

Instantly share code, notes, and snippets.

@cbeust
Created October 5, 2021 03:54
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 cbeust/16c94ac90e0ac0db5251902fd0377a95 to your computer and use it in GitHub Desktop.
Save cbeust/16c94ac90e0ac0db5251902fd0377a95 to your computer and use it in GitHub Desktop.
struct Opcode {
opcode: u8,
name: &'static str,
size: usize,
}
let mut result: HashMap<u8, Opcode> = HashMap::new();
for op in ops {
result.insert(op.0, Opcode::new(op.0, op.1, op.2));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment