Skip to content

[EXTERNAL] docs(drawing): fix implementation example for rectangle#3013

Closed
sadiqui wants to merge 2 commits into01-edu:masterfrom
sadiqui:patch-22
Closed

[EXTERNAL] docs(drawing): fix implementation example for rectangle#3013
sadiqui wants to merge 2 commits into01-edu:masterfrom
sadiqui:patch-22

Conversation

@sadiqui
Copy link
Copy Markdown
Contributor

@sadiqui sadiqui commented Aug 1, 2025

Fix Rectangle Implementation Example

This PR updates the example usage of the Rectangle shape to correctly demonstrate a rectangle, rather than a square, as the original coordinates resulted in equal width and height.

Changes:

  • Replaced:

    let rectangle = gs::Rectangle::new(&gs::Point::new(150, 150), &gs::Point::new(50, 50));

    with:

    let rectangle = gs::Rectangle::new(&gs::Point::new(150, 300), &gs::Point::new(50, 60));

Note:

This corrected example is borrowed from the rust/tests repository.

@pedrodesu
Copy link
Copy Markdown
Contributor

pedrodesu commented Aug 28, 2025

While technically squares classify as rectangles, I agree changing to a non-square example, the same as the one in the tests here makes sense. If you can, please run prettier -w on the file and push the change, as it's not prettier compliant as of right now. With that I can merge without conflicts. Thank you once again!

@pedrodesu pedrodesu added 🗂️ docs Documentation 📕 Rust Rust labels Aug 28, 2025
@pedrodesu
Copy link
Copy Markdown
Contributor

Closed in favor of #3016. Includes this one change and has prettier all set up.

@pedrodesu pedrodesu closed this Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗂️ docs Documentation 📕 Rust Rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants