Add destroy to Drawing to close window programatically - #245
Conversation
sunjay
left a comment
There was a problem hiding this comment.
Thanks for taking the time to implement this feature! Unfortunately, this repo doesn't currently support rustfmt (a lot of the formatting decisions made by that tool aren't super desirable). Could you update your PR to only contain changes relevant to the feature you're implementing? You can usually do this by using a tool like git gui or sourcetree to only select the changes you want to submit.
As far as I can see you've done a great job implementing this. No major feedback other than a few small comments. I'd be happy to take another look and merge once we've narrowed this down to only the changes needed for #181. Thanks again! 🎉 😁
| Self { event_loop } | ||
| } | ||
|
|
||
| pub fn exit(&self) -> Result<(), EventLoopClosed> { |
There was a problem hiding this comment.
nit: could you move this method down to the bottom so it matches the order in the enum? (makes it a bit easier to see that each variant of the enum has a corresponding method here)
| Self {} | ||
| } | ||
|
|
||
| pub fn exit(&self) -> Result<(), EventLoopClosed> { |
There was a problem hiding this comment.
Please also move this method down per my previous comment.
sunjay
left a comment
There was a problem hiding this comment.
Great work @sathwikmatsa! Appreciate you writing docs and an example for the method and knowing to add the compile_error! call to the runtest example.
Resolves #181
Modified examples/runtest.rs to use
Drawing::destroy()and tested it on Mac.