Skip to content

Rename Invert to Flip - Issue #10632 #11686

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

Merged
merged 2 commits into from
Jan 24, 2014

Conversation

mankyKitty
Copy link
Contributor

Renamed the invert() function in iter.rs to flip(), from #10632

Also renamed the Invert<T> type to Flip<T>.

Some related code comments changed. Documentation that I could find has
been updated, and all the instances I could locate where the
function/type were called have been updated as well.

This is my first contribution to Rust! Apologies in advance if I've snarfed the
PR process, I'm not used to rebase.

I initially had issues with the codegen section of the tests failing, however
the make check process is not reporting any failures at this time. I think
that was a local env issue more than me facerolling my changes. :)

@alexcrichton
Copy link
Member

We should discuss this before merging as it doesn't look like there was consensus on the issue of what course of action to take.

@thestinger
Copy link
Contributor

I'm okay with renaming this. I don't really care much either way but I think flip is more discoverable. I had to think of a name that wasn't reverse as it was already used, and invert is what I came up with.

@mankyKitty
Copy link
Contributor Author

I just commented on the issue, I was thinking maybe it should be flip_iter or flip_iter_direction since it's the direction of the iterator that is being flipped, not the collection itself.. If I've understood things correctly.

That is if people aren't happy with flip(). Obviously I am already, but that's hardly the point. :P haha

@liigo
Copy link
Contributor

liigo commented Jan 21, 2014

+1 for Rev<T>

@alexcrichton
Copy link
Member

I, too, think that Rev and rev would be suitable names for the type and method.

It doesn't sound like there's much opposition to these names, so would you mind rebasing with the new names?

@mankyKitty
Copy link
Contributor Author

Not a problem. :)

Renamed the invert() function in iter.rs to flip().

Also renamed the Invert<T> type to Flip<T>.

Some related code comments changed. Documentation that I could find has
been updated, and all the instances I could locate where the
function/type were called have been updated as well.
Consensus leaned in favour of using rev instead of flip.
bors added a commit that referenced this pull request Jan 24, 2014
…632, r=alexcrichton

Renamed the ```invert()``` function in ```iter.rs``` to ```flip()```, from #10632 

Also renamed the ```Invert<T>``` type to ```Flip<T>```.

Some related code comments changed. Documentation that I could find has
been updated, and all the instances I could locate where the
function/type were called have been updated as well.

This is my first contribution to Rust! Apologies in advance if I've snarfed the 
PR process, I'm not used to rebase.

I initially had issues with the ```codegen``` section of the tests failing, however
the ```make check``` process is not reporting any failures at this time. I think
that was a local env issue more than me facerolling my changes. :)
@bors bors closed this Jan 24, 2014
@bors bors merged commit 292ed3e into rust-lang:master Jan 24, 2014
@mankyKitty mankyKitty deleted the rename-invert-to-flip-issue-10632 branch January 24, 2014 08:31
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 1, 2023
…entri3

Lint `flatten()` under `lines_filter_map_ok`

Fixes rust-lang#11686

changelog: [`lines_filter_map_ok`]: Also lint calls to `flatten()`
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.

5 participants