-
Notifications
You must be signed in to change notification settings - Fork 186
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
Adding Rect constructor to address issue #359: #360
Conversation
2. Update internal Rect struct literals to use constructors. 3. Use of the Rect struct literals in unit tests are left alone.
🔒 Permission denied Existing reviewers: click here to make Chopinsky a reviewer |
@@ -12,6 +12,35 @@ where | |||
} | |||
|
|||
impl<T: CoordinateType> Rect<T> { | |||
/// Creates a new rectangle. | |||
/// | |||
/// # Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding a # Panics
section above this documenting how this function can panic? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just updated the doc to mention the panic conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
bors r+ |
360: Adding Rect constructor to address issue #359: r=frewsxcv a=Chopinsky To address the issue #359 of lacking a Rect geo-type constructor that can perform coordinates validations, I've made the following changes: 1. Add a `new` constructor to the Rect geo-type. 2. Update all internal use of the Rect struct literals to the new constructor. However, existing use of the Rect struct literals in unit tests are left alone. Co-authored-by: Jacob Zuo <chopinsky@live.com>
Build succeeded |
To address the issue #359 of lacking a Rect geo-type constructor that can perform coordinates validations, I've made the following changes:
new
constructor to the Rect geo-type.However, existing use of the Rect struct literals in unit tests are left alone.