BlackBoxMC / blackboxmc-rs

Rust bindings for BlackBoxMC
GNU Lesser General Public License v3.0
12 stars 1 forks source link

Properly execute the functions that take Option parameters. #13

Closed IoIxD closed 1 year ago

IoIxD commented 1 year ago

I finally got back to handling function overloading, and this time I actually did solve it. Part of the solution was detecting "ascending functions" that just overload each other and add one more argument, and then adding a version of the highest function where any arguments that the lowest arguments don't have are passed as Options.

Currently, for these functions, we just use .unwrap() on the option values, meaning that the code will crash if a value is None, which is not actually what we want. This should be fixed.

IoIxD commented 1 year ago

They were changed to .ok_or(...) calls. The next version should probably actually bind them.

IoIxD commented 1 year ago

(i implemented this. this isn't confirmation that i actually left the ok_or stuff in)