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

PR 2363's use of &T made Copy/Clone traits unnecessary in section 10.2 #2580

Closed

Conversation

dmazin
Copy link

@dmazin dmazin commented Jan 21, 2021

In #2363, @steveklabnik changed Listing 10-5 to use &T. Seems like one of the goals was to avoid messiness related to Copy/Clone.

I noticed that this section used an old version of Listing 10-5, so I updated it to use the new version of Listing 10-5. Given that listing 10-5 avoids messiness related to Copy/Clone, adding the PartialOrd trait is enough to make listings/ch10-generic-types-traits-and-lifetimes/no-listing-07-fixing-listing-10-05/src/main.rs compile happily.

Listing 10-15 is no longer required. I'm not sure what y'all do when a listing is removed -- I don't know if Listings 10-16+ need to be renumbered.

@dmazin dmazin changed the title PR 2363's use of &T made Copy/Clone traits unnecessary PR 2363's use of &T made Copy/Clone traits unnecessary in section 10.2 Jan 21, 2021
@carols10cents
Copy link
Member

Thanks, but I decided to go with the fix in #2460 instead.

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