Skip to content

Implement Clone and DeepClone for extra::time::{Tm, Timespec} #8555

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 2 commits into from

Conversation

chris-morgan
Copy link
Member

I need Clone for Tm for my latest work on rust-http (static typing for headers, and headers like Date are a time), so here it is.

@huonw recommended deriving DeepClone while I was at it.

I also had to implement DeepClone for ~str to get a derived implementation of DeepClone for Tm; I did @str while I was at it, for consistency.

bors added a commit that referenced this pull request Aug 18, 2013
I need `Clone` for `Tm` for my latest work on [rust-http](https://github.com/chris-morgan/rust-http) (static typing for headers, and headers like `Date` are a time), so here it is.

@huonw recommended deriving DeepClone while I was at it.

I also had to implement `DeepClone` for `~str` to get a derived implementation of `DeepClone` for `Tm`; I did `@str` while I was at it, for consistency.
@bors bors closed this Aug 18, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 31, 2023
new lint: [`readonly_write_lock`]

Closes rust-lang#8555

A new lint that catches `RwLock::write` calls to acquire a write lock only to read from it and not actually do any writes (mutations).

changelog: new lint: [`readonly_write_lock`]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants