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

Adding Rect constructor to address issue #359: #360

Merged
merged 3 commits into from
May 26, 2019
Merged

Adding Rect constructor to address issue #359: #360

merged 3 commits into from
May 26, 2019

Conversation

Chopinsky
Copy link
Contributor

@Chopinsky Chopinsky commented May 7, 2019

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.

2. Update internal Rect struct literals to use constructors.
3. Use of the Rect struct literals in unit tests are left alone.
@bors
Copy link
Contributor

bors bot commented May 7, 2019

🔒 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
Copy link
Member

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!

Copy link
Contributor Author

@Chopinsky Chopinsky May 15, 2019

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.

Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

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

thanks!

@frewsxcv
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request May 26, 2019
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>
@bors
Copy link
Contributor

bors bot commented May 26, 2019

Build succeeded

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.

None yet

2 participants