Skip to content

Don't require an owned value for property setters.#1189

Open
emilio wants to merge 1 commit intoz-galaxy:mainfrom
emilio:no-clone-value
Open

Don't require an owned value for property setters.#1189
emilio wants to merge 1 commit intoz-galaxy:mainfrom
emilio:no-clone-value

Conversation

@emilio
Copy link
Copy Markdown
Contributor

@emilio emilio commented Dec 26, 2024

I wrote this as I was thinking about #1180, but not sure it's worth the complexity. If you think there are some other things that might use it, please go ahead and merge it, otherwise feel free to close :)

interface_name: InterfaceName<'_>,
property_name: &str,
value: Value<'_>,
value: &Value<'_>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this will be a breaking change since this is a public API. :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, ok, lmk if / how you want to deal with it and I can update the patch. Alternatively feel free to just close this (or tag it as deferred or whatever you want :))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just tag it I guess. I hope you're around to rebase when 6.0 is being released. :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just realised something: we can add another method here, that does what we need and then have the existing method use that one.

I'm thinking of adding a more generic method though that interface impl can use directly..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking of adding a more generic method though that interface impl can use directly..

Ok, nm this part for now (#1361). However, I think a new method will help get around the API break.

I wrote this as I was thinking about z-galaxy#1180, but not sure it's worth the
complexity. If you think there are some other things that might use it,
please go ahead and merge it, otherwise feel free to close :)
@emilio
Copy link
Copy Markdown
Contributor Author

emilio commented Dec 27, 2024

I addressed the (somewhat pedantic) clippy lint :)

@zeenix zeenix added this to the zbus-6.0 milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants