![]() # Objective Tab navigation can fail in all manner of ways. The current API recognizes this, but merely logs a warning and returns `None`. We should supply the actual reason for failure to the caller, so they can handle it in whatever fashion they please (including logging a warning!). Swapping to a Result-oriented pattern is also a bit more idiomatic and makes the code's control flow easier to follow. ## Solution - Refactor the `tab_navigation` module to return a `Result` rather than an `Option` from its key APIs. - Move the logging to the provided prebuilt observer. This leaves the default behavior largely unchanged, but allows for better user control. - Make the case where no tab group was found for the currently focused entity an error branch, but provide enough information that we can still recover from it. ## Testing The `tab_navigation` example continues to function as intended. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |