You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
allaboutevemirolive
changed the title
Make function pointer type of Option<fn()>
Refactor: Change Registry Function Pointer Types to Option<fn()>Sep 14, 2024
I'm not convinced about this implementation. All fields will be called regardless of whether they're used, so wrapping the type in Option seems unnecessary.
The key difference is that using Option requires us to check or unwrap it for every folder iteration. Without Option, we can avoid these extra steps, either calling a function that performs an action or a no-op function.
For context: https://doc.rust-lang.org/beta/std/primitive.fn.html
trees-rs/src/config/registry.rs
Lines 30 to 56 in a5a9058
The text was updated successfully, but these errors were encountered: