This repository was archived by the owner on Mar 1, 2019. It is now read-only.
Further simplify and explain crate id mapping#103
Merged
Conversation
c15b24a to
8a802c8
Compare
nrc
reviewed
Oct 17, 2017
Contributor
nrc
left a comment
There was a problem hiding this comment.
Looks good apart from one of the Clippy changes
| pub fn new() -> Analysis { | ||
| Analysis { | ||
| pub fn new() -> Self { | ||
| Self { |
Contributor
There was a problem hiding this comment.
I don't like this change - it adds an annoying level of indirection for the reader
| SymbolResult { | ||
| id: id, | ||
| fn new(id: Id, def: &Def) -> Self { | ||
| Self { |
| pub fn new(target: Target) -> AnalysisHost { | ||
| AnalysisHost { | ||
| pub fn new(target: Target) -> Self { | ||
| Self { |
8a802c8 to
6c28fe8
Compare
Xanewok
commented
Oct 17, 2017
| impl<L: AnalysisLoader> AnalysisHost<L> { | ||
| pub fn new_with_loader(l: L) -> AnalysisHost<L> { | ||
| AnalysisHost { | ||
| pub fn new_with_loader(loader: L) -> Self { |
Contributor
Author
There was a problem hiding this comment.
Is this Self okay here? In case of generic types I think it is less noisy and quickly allows to see that the returned generic type is the same as ours
Contributor
Author
|
Updated, let me know if anything else also needs changing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses some Clippy lints, simplifies a bit, but most importantly, explains more the local -> global crate id mapping, which I couldn't understand at first. I hope this makes it a bit more easy to understand.