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

Uniform TryGetValue usage #6598

Merged
merged 3 commits into from
Apr 22, 2019
Merged

Uniform TryGetValue usage #6598

merged 3 commits into from
Apr 22, 2019

Conversation

ncave
Copy link
Contributor

@ncave ncave commented Apr 21, 2019

Making TryGetValue usage more uniform.

let ok = tbl.dict.TryGetValue(x, &res)
if ok then res
else tbl.AddSharedEntry x
match tbl.dict.TryGetValue(x) with
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the parens

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@forki Done.

let ok = firstEntries.TryGetValue(y,&res)
if ok then Some(res) else None
match firstEntries.TryGetValue y with
| true, res -> Some(res)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need the brackets here?

Copy link
Contributor Author

@ncave ncave Apr 22, 2019

Choose a reason for hiding this comment

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

@KevinRansom That's how it was, fixed now.

Copy link
Member

@KevinRansom KevinRansom Apr 22, 2019

Choose a reason for hiding this comment

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

@ncave, yeah I get it, it's the worst part of cleanup PR's. You opt in to fixing all of the rubbish that was there before :-)

@KevinRansom
Copy link
Member

Thanks for this.

@KevinRansom KevinRansom merged commit f444e58 into dotnet:master Apr 22, 2019
@ncave ncave deleted the trygetv branch April 22, 2019 20:28
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.

3 participants