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

feat: Added exercises/enums #213

Closed
wants to merge 1 commit into from
Closed

Conversation

xmaayy
Copy link

@xmaayy xmaayy commented Aug 25, 2019

Added 3 new exercises for enums, enums{1-3}.rs. Enums were used in some of the exercises but never taught. These 3 exercises cover putting elements into an enum, referencing elements in an enum, and a few of the types of elements you can have in an enum. All exercises closely follow the book and as such should be a good intro before the later lessons that use them.

Added 3 new exercises for enums, enums{1-3}.rs
@xmaayy
Copy link
Author

xmaayy commented Sep 27, 2019

Any reason this isnt being merged?

Copy link
Member

@shadows-withal shadows-withal left a comment

Choose a reason for hiding this comment

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

thanks! some minor nits

Banana,
Apple,
Pear,
Mango
Copy link
Member

Choose a reason for hiding this comment

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

let's put a trailing comma here


fn main() {
// Assign this variable to your favorite fruit
// let fruit = ???;
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this say let favorite = ????

@@ -0,0 +1,61 @@
// enums3.rs
// Try making an enum to immitate these structs
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Try making an enum to immitate these structs
// Try making an enum to imitate these structs


fn main() {
// These do not need to be touched :) but the file will not compile if the
// elements of the enum have not been defines
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// elements of the enum have not been defines
// elements of the enum have not been defined

@bors
Copy link
Contributor

bors commented Nov 9, 2019

☔ The latest upstream changes (presumably #224) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: Waiting on issue/PR author label Nov 9, 2019
@shadows-withal
Copy link
Member

Closing this in favor of #224.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: Waiting on issue/PR author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants