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

fs: align symlink parameter names with std #7143

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

florian-g2
Copy link
Contributor

Motivation

Using src and dst as parameter names in the context of symlinks is confusing, especially in their order.

I usually think from left to right: a symlink points to a target.
So I assumed that src would point to dst, but that isn’t the case here.

Solution

Align to the standard library and use original and link as the parameter names.

@maminrayej maminrayej added A-tokio Area: The main tokio crate M-fs Module: tokio/fs labels Feb 7, 2025
@maminrayej
Copy link
Member

LGTM. But for consistency, please also rename the parameters for hard_link as well.

@florian-g2
Copy link
Contributor Author

Right. Missed that.

@maminrayej maminrayej merged commit 7e27911 into tokio-rs:master Feb 7, 2025
82 checks passed
@maminrayej
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-fs Module: tokio/fs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants