Skip to content

Conversation

@emlun
Copy link
Contributor

@emlun emlun commented May 26, 2019

I noticed some repeated code, and also added a test for good measure.

@ehuss
Copy link
Contributor

ehuss commented May 27, 2019

Thanks!

@ehuss ehuss merged commit c29c88d into rust-lang:master May 27, 2019
@emlun emlun deleted the refactor-cmp branch May 27, 2019 20:42
@emlun
Copy link
Contributor Author

emlun commented May 27, 2019

You're welcome!

By the way, I also experimented a bit with adding a trait OrdC { fn c_cmp(...) -> c_int } and an impl<T: OrdC> Ord for T, but it seems like that's not allowed by Rust's orphan rules (it would work if Ord had been defined in this crate). If you have any ideas on how something like that could be doable, I'd be happy to experiment a bit more with it to see what happens.

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