Better understand the use case here, or replace the debug with "UNSUPPORTED KEY TYPE"
Either I don't understand it or it's an outdated comment, I think those types of comment explaining WHAT the code is doing are generally bad. Comments should explain WHY. If you need to express a WHAT, use a function.
So much better. I think there are more Rust idiomatic ways to handle that with Slices or something but it's good enough :
This is just so much better. And it shows in the UX. Usually a good UX requires good code and good code produces a good UX.
This function, though pretty simple, deserves a test. Could be a good place for a doctest. Not necessary though, just spilling my thoughts.
Those 8 lines should be extracted to a utilty function in the test module such as "init_test_maestro() -> Maestro"
Weird comment here again, does not relate directly to the code block. I think I'd rather not have it.