Skip to content

models::Dependency: Replace encodable() method #3134

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

Merged
merged 2 commits into from
Jan 7, 2021

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 28, 2020

This PR continues #3124 by implementing from_dep() and from_reverse_dep() methods for the EncodableDependency struct and removing the encodable() methods on Dependency and ReverseDependency. We can't use the From trait in these cases because the crate_name has to be explicitly provided. What we could do instead is implement From<(Dependency, String)>, but that doesn't feel right to me.

r? @pietroalbini

@pietroalbini
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jan 7, 2021

📌 Commit f79a463 has been approved by pietroalbini

@bors
Copy link
Contributor

bors commented Jan 7, 2021

⌛ Testing commit f79a463 with merge ecd775b...

@bors
Copy link
Contributor

bors commented Jan 7, 2021

☀️ Test successful - checks-actions
Approved by: pietroalbini
Pushing ecd775b to master...

@bors bors merged commit ecd775b into rust-lang:master Jan 7, 2021
@Turbo87 Turbo87 deleted the encodable-dep branch January 9, 2021 20:32
bors added a commit that referenced this pull request Jan 11, 2021
CrateOwnerInvitation: Replace `encodable()` method

This PR is similar to #3134 and brings us one step closer to removing the `models -> views` dependency by inverting the relationship for the `CrateOwnerInvitation` model and `EncodableCrateOwnerInvitation` view.

r? `@pietroalbini`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants