Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse verbs instead of adjectives for transformations with #[must_use]. #198
Conversation
|
r? @kvark |
|
Wouldn't it be easier to just put |
| @@ -179,12 +183,12 @@ where T: Copy + Clone + | |||
| } | |||
|
|
|||
| /// Applies a scale after self's transformation and returns the resulting transform. | |||
| pub fn post_scaled(&self, x: T, y: T) -> TypedTransform2D<T, Src, Dst> { | |||
| pub fn post_scale(&self, x: T, y: T) -> TypedTransform2D<T, Src, Dst> { | |||
This comment has been minimized.
This comment has been minimized.
|
must_use comes from the way the functions are written in euclid (only immutable methods that return a result), rather than the structures themselves. Unless you have a strong preference I would rather keep the annotations on the methods even if it is a bit noisy. That way users of euclid can return vectors and points in places where must_use does not make as much sense as it does here. |
|
Sounds good, thanks @nical ! |
|
|
Use verbs instead of adjectives for transformations with #[must_use]. Fixes #195. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/198) <!-- Reviewable:end -->
|
|
nical commentedMay 27, 2017
•
edited by larsbergstrom
Fixes #195.
This change is