Edit - fixed code link!
I'm having trouble calling a function from a tuple.
Here is the Code
I've included it all so maybe you guys and help me figure out what is going on. I'm just learning Rust and really liking it, but this compiles and runs without error, except it does nothing. I'm not getting any good warnings either.
if op.2.is_match(&format!("{:016b}", i)) { println!("Found Match! {:?}", op.0); op.1(i); }
If I comment out the op.1(i)
then the match works and println prints Found Match! and op.0. Otherwise it prints nothing within the match.
You'll have to refer the the Gist to see how I set the function pointer. (It's short code I promise).
I'm sure I'm just doing something silly with the Tuple and function pointer. Any help is greatly appreciated and any tips of the design of code overall is also appreciated. The end goal of this program is to generate functions for a 68k CPU emulator. I do understand that I should break the program into modules, I'm just trying to get the best functionality working before I break it into modules.