Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Use Inferrable for target/ config option #793

Merged
merged 5 commits into from
Mar 29, 2018

Conversation

Xanewok
Copy link
Member

@Xanewok Xanewok commented Mar 27, 2018

Followup to #788.

First of all, it fixes target/rls dir (with #788 it reused the same dir as Cargo, oops!).
It now uses the Inferrable wrapper, so it's possible to specify the value, set it to fallback and then re-set it again.
Additionally it properly uses the relative passed dir (which slipped through in #788, I definitely need to do something about the tests 😟 ) now.

r? @nrc

Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

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

Looks good, a few comments inline

src/config.rs Outdated
return false;
} else {
return true;
}
Copy link
Member

Choose a reason for hiding this comment

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

This would be better as a match

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Let's, uh, not talk about previous, totally correct return false, though!

src/config.rs Outdated
}

return true;
Copy link
Member

Choose a reason for hiding this comment

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

This looks wrong - it's essentially if ... { true } else { true }

Copy link
Member

Choose a reason for hiding this comment

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

And you don't need the final return

@nrc nrc merged commit a793188 into rust-lang:master Mar 29, 2018
@nrc
Copy link
Member

nrc commented Mar 29, 2018

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants