Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update delegate requirement from 0.9.0 to 0.10.0 #525

Merged
merged 1 commit into from
Jul 2, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 1, 2023

Updates the requirements on delegate to permit the latest version.

Changelog

Sourced from delegate's changelog.

Dev

  • Allow specifying certain attributes (e.g. #[into] or #[unwrap]) on delegated segments. The attribute will then be applied to all methods in that segment (unless it is overwritten on the method itself).
delegate! {
  #[unwrap]
  to self.inner {
    fn foo(&self) -> u32; // calls self.inner.foo().unwrap()
    fn bar(&self) -> u32; // calls self.inner.bar().unwrap()
  }
}
  • Add new #[unwrap] method modifier. Adding it on top of a delegated method will cause the generated code to .unwrap() the result.
#[unwrap]
fn foo(&self) -> u32;  // foo().unwrap()
  • Add new #[through(<trait>)] method modifier. Adding it on top of a delegated method will cause the generated code to call the method through the provided trait using UFCS.
#[through(MyTrait)]
delegate! {
  to &self.inner {
    #[through(MyTrait)]
    fn foo(&self) -> u32;  // MyTrait::foo(&self.inner)
  }
}
  • Removed #[try_into(unwrap)]. It can now be replaced with the combination of #[try_into] and #[unwrap]:
#[try_into]
#[unwrap]
fn foo(&self) -> u32;  // TryInto::try_into(foo()).unwrap()
  • Add the option to specify explicit type path to the #[into] expression modifier:
#[into(u64)]
fn foo(&self) -> u64; // Into::<u64>::into(foo())
  • Expression modifiers #[into], #[try_into] and #[unwrap] can now be used multiple times. The order of their usage dictates in what order they will be applied:
#[into]
#[unwrap]
fn foo(&self) -> u32;  // Into::into(foo()).unwrap()
#[unwrap]
#[into]
fn foo(&self) -> u32;  // Into::into(foo().unwrap())
</tr></table>

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Jul 1, 2023
@molpopgen
Copy link
Member

@dependabot rebase

Updates the requirements on [delegate](https://github.com/kobzol/rust-delegate) to permit the latest version.
- [Changelog](https://github.com/Kobzol/rust-delegate/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kobzol/rust-delegate/commits)

---
updated-dependencies:
- dependency-name: delegate
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/cargo/delegate-0.10.0 branch from dd6d4b2 to 325286f Compare July 2, 2023 17:12
@molpopgen
Copy link
Member

@dependabot squash and merge

@dependabot dependabot bot merged commit 347026e into main Jul 2, 2023
13 checks passed
@dependabot dependabot bot deleted the dependabot/cargo/delegate-0.10.0 branch July 2, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant