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

Implement fs::rename in sys::redox #43204

Merged
merged 2 commits into from
Jul 14, 2017
Merged

Implement fs::rename in sys::redox #43204

merged 2 commits into from
Jul 14, 2017

Conversation

jackpot51
Copy link
Contributor

This uses a simple implementation of copy + unlink. Redox does not have a rename or link system call for a faster implementation.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -384,8 +384,9 @@ pub fn unlink(p: &Path) -> io::Result<()> {
}

pub fn rename(_old: &Path, _new: &Path) -> io::Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

you forgot to rename the arguments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the reminder @durka

unimplemented!();
copy(old, new)?;
unlink(old)?;
Ok(())
Copy link
Contributor

Choose a reason for hiding this comment

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

The 2 proceeding lines could be reduced to unlink(old)

@alexcrichton
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 13, 2017

📌 Commit 4259ae6 has been approved by alexcrichton

@jackpot51
Copy link
Contributor Author

Thanks!

@alexcrichton alexcrichton added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 13, 2017
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Jul 13, 2017
Implement fs::rename in sys::redox

This uses a simple implementation of copy + unlink. Redox does not have a rename or link system call for a faster implementation.
bors added a commit that referenced this pull request Jul 14, 2017
Rollup of 7 pull requests

- Successful merges: #42926, #43125, #43157, #43167, #43187, #43203, #43204
- Failed merges:
@bors bors merged commit 4259ae6 into rust-lang:master Jul 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants