Skip to content

Refactor type combining to use default methods. Woohoo! #8669

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

Closed
wants to merge 1 commit into from

Conversation

lkuper
Copy link
Contributor

@lkuper lkuper commented Aug 21, 2013

This commit removes the "super_*" functions from
typeck::infer::combine, and adds them as default methods on the
Combine trait instead, making it possible to remove a lot of
boilerplate from the various impls of Combine.

I've been wanting to do this for over a year. In fact, it was my
original motivation for default methods!

It might be possible to tighten things up even more, but this is the
bulk of it.

This commit removes the "super_*" functions from
typeck::infer::combine, and adds them as default methods on the
Combine trait instead, making it possible to remove a lot of
boilerplate from the various impls of Combine.

I've been wanting to do this for over a year.  In fact, it was my
original motivation for default methods!

It might be possible to tighten things up even more, but this is the
bulk of it.
@bblum
Copy link
Contributor

bblum commented Aug 21, 2013

that's a pretty hot diffstat for just moving some code around

bors added a commit that referenced this pull request Aug 22, 2013
This commit removes the "super_*" functions from
typeck::infer::combine, and adds them as default methods on the
Combine trait instead, making it possible to remove a lot of
boilerplate from the various impls of Combine.

I've been wanting to do this for over a year.  In fact, it was my
original motivation for default methods!

It might be possible to tighten things up even more, but this is the
bulk of it.
@bors bors closed this Aug 22, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 21, 2022
…nce, r=xFrednet

fix comments in test for split_once

This PR fixed comments in test.

`split_once` was stabilized in 1.52, so I think the comments maybe be wrong.

ref:
https://doc.rust-lang.org/std/string/struct.String.html#method.split_once

thank you in advance.

changelog: none
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.

4 participants