Skip to content

doubly-linked-list: Allow should_implement_trait#1029

Merged
petertseng merged 2 commits intoexercism:masterfrom
petertseng:clipnext
Nov 20, 2020
Merged

doubly-linked-list: Allow should_implement_trait#1029
petertseng merged 2 commits intoexercism:masterfrom
petertseng:clipnext

Conversation

@petertseng
Copy link
Copy Markdown
Member

It's understandable that clippy says the next here conflicts with
Iterator's next, but I really think that's the best name for it unless
we go with something like forward and back.

There is one other example of Cursors on the internet:
https://contain-rs.github.io/linked-list/linked_list/struct.Cursor.html
This one also uses next, so it seems they did not find a better
solution to this than we could.

Helps address #1011
Helps address #1012

It's understandable that clippy says the `next` here conflicts with
Iterator's `next`, but I really think that's the best name for it unless
we go with something like `forward` and `back`.

There is one other example of Cursors on the internet:
https://contain-rs.github.io/linked-list/linked_list/struct.Cursor.html
This one also uses `next`, so it seems they did not find a better
solution to this than we could.

Helps address #1011
Helps address #1012
@petertseng
Copy link
Copy Markdown
Member Author

I have changed my mind since saying "I think it'd be weird to distribute this attribute to students". I think it's fine. Maybe it'll get them curious about Clippy.

Copy link
Copy Markdown
Member

@coriolinus coriolinus left a comment

Choose a reason for hiding this comment

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

I don't feel strongly one way or the other about whether it's weird to show this annotation to students. We already recommend clippy in every readme file, so they should at least be aware that it's a thing. Once a student has reached the point of implementing doubly-linked list, I think it's unlikely that they'll never have seen anything like this before.

Comment thread exercises/doubly-linked-list/src/lib.rs Outdated
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
@petertseng petertseng merged commit 1f15e78 into exercism:master Nov 20, 2020
@petertseng petertseng deleted the clipnext branch November 20, 2020 08:48
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.

2 participants