frederickjjoubert / bevy-ball-game

This is a small game I made to teach the basics of the Bevy Game Engine
https://bevyengine.org
MIT License
78 stars 16 forks source link

derive Default trait #1

Closed oriontvv closed 9 months ago

oriontvv commented 1 year ago

btw common practice in rust is using return Self when implementing Default trait

frederickjjoubert commented 9 months ago

Hi there, thanks for making this PR. You are right that just using the derive macro in this case for Default is more idiomatic, but I wanted to show users how you can implement traits like Default from the standard library ones self. 😄