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

Cleanup for std::result #7969

Closed
wants to merge 8 commits into from
Closed

Cleanup for std::result #7969

wants to merge 8 commits into from

Conversation

MaikKlein
Copy link
Contributor

I am doing some cleanups in std::result.

@alexcrichton
Copy link
Member

It looks like this has also added back in net/ip and net/tcp, would you mind amending to remove those?

@MaikKlein
Copy link
Contributor Author

Oh that is weird, I thought I deleted them. Thanks for the catch.

*
* Example:
*
* let res = map(read_file(file)) { |buf|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the method, not the function.

@MaikKlein
Copy link
Contributor Author

what is the best way to delete the changes to net::tcp etc in 3043b71?

git checkout 3043b71 , git rm net::tcp , git commit --amend and then back with git checkout master?

@MaikKlein
Copy link
Contributor Author

I am sorry, I am not that proficient in git yet. I am currently reading the git book. I was trying for hours to edit my commit and remove the tcp /ip changes but it didn't work out.

So I just added a additional commit, that removes tcp and ip :(

@erickt
Copy link
Contributor

erickt commented Jul 23, 2013

@MaikKlein: You can use an interactive rebase to clean up the history. Here are some links on how to do it:

Your case is pretty simple though, since you added the files in one commit back from the HEAD branch. You should be able to squash the two with:

% git branch backup master # just to save your work in case something goes wronge
% git reset --soft HEAD~ # this throws away commit 8662e95, but leaves the change you made (removing tcp/ip)
% git commit --amend # this adds the changes you made in 8662e95 to 44692ac
% gitk --all& # see if everything changed like you expected
% git branch -D backup # assuming everything looks good
% git push -f $YOUR_REMOTE master

Feel free to ping me on #rust IRC (erickt) if you need some help with this. If I'm not around, I'm sure someone else in the channel could help you out as well.

@alexcrichton
Copy link
Member

Whenever this is no longer a work-in-progress, feel free to comment saying so and I'd be willing to take a look!

@MaikKlein
Copy link
Contributor Author

Thanks, I am sorry for the mess. Next time when I do a PR I will have a proper knowledge of git. I will finish this PR now.

@MaikKlein
Copy link
Contributor Author

I think the cleanup work is finished. If the PR is in a too messy state to be processed, then I will redo the PR in a few days. For example 58f934f is completely unecessary the commit somehow got merged with 2edf6d2, and the libextra/net removal is in 9593c14 .

I really have to learn some git, I just thought git would be more straight forward.

I just removed the functions in std::result.rs. They are all methods now. I updated the examples. I also added a ToEither trait for the to_either method.

@MaikKlein
Copy link
Contributor Author

everything compiles and all tests pass now

@erickt
Copy link
Contributor

erickt commented Jul 26, 2013

@MaikKlein: Just in case you didn't notice, there were some errors with the merge.

@MaikKlein
Copy link
Contributor Author

Yes I have noticed it. It seems that I have messed something up. I just have no working station at the moment, I hope that I can fix it tomorrow.

bors added a commit that referenced this pull request Jul 28, 2013
Good evening,

This is a superset of @MaikKlein's #7969 commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
@huonw
Copy link
Member

huonw commented Jul 28, 2013

Landed in #8069.

@huonw huonw closed this Jul 28, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 23, 2021
fix typo

just fixed typo

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.

5 participants