-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Description
While putting together #120 and some other things, i noticed that it is unnecessary that MockComponent::query returns a value that is not a reference.
This keep this backwards compatible, this could be implemented as a new optional function.
Changes
When wanting to keep backwards compat, add a new optional function that has the signature of:
fn(&self, attr: Attribute) -> Option<&AttrValue>;If not wanting backwards compat (ie a new major version), consider changing query directly.
For reference, the following is the current (as of 3.1.0 definition):
tui-realm/src/core/component.rs
Line 30 in 10923d2
| fn query(&self, attr: Attribute) -> Option<AttrValue>; |