Skip to content

Conversation

ekse
Copy link
Contributor

@ekse ekse commented Apr 17, 2017

No description provided.

@ekse ekse mentioned this pull request Apr 17, 2017
48 tasks
@ekse
Copy link
Contributor Author

ekse commented Apr 17, 2017

This is my first attempt at a contribution to Rust (yay!), let me know if something is wrong or if you would like the text worded differently.

@@ -436,6 +436,9 @@ operators on standard types is given here.
: Greater than or equal.
Calls the `ge` method on the `std::cmp::PartialOrd` trait.

Parentheses are required when chaining comparison operators. For example, the
expression `a == b == c` is invalid and may be written as `((a == b) == c)`.
Copy link
Contributor

Choose a reason for hiding this comment

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

could this be (a == b) == c, that is, without the outer parens? In if statements, those outer ones will cause a warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, it's fixed now.

@steveklabnik
Copy link
Contributor

One tiny comment, otherwise, this looks good! Thank you! 😄

@steveklabnik steveklabnik merged commit c6f4de7 into rust-lang:master Apr 17, 2017
@steveklabnik
Copy link
Contributor

Thank you!

@ekse ekse deleted the parentheses-chained-comparisons branch April 17, 2017 16:14
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.

2 participants