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

Inconsistent argument order #232

Open
Arkanayan opened this issue Jun 15, 2020 · 2 comments
Open

Inconsistent argument order #232

Arkanayan opened this issue Jun 15, 2020 · 2 comments

Comments

@Arkanayan
Copy link
Contributor

Compare the argument order of the functions

pub fn append_path_with_name<P: AsRef<Path>, N: AsRef<Path>>(
        &mut self,
        path: P, // path in the filesystem
        name: N, // path in the archive
    )

and

pub fn append_dir_all<P, Q>(
    &mut self, path: P, // path in the archive
    src_path: Q // path in the filesystem
)

In the functions, the argument orders are reversed. It may cause confusion.

@alexcrichton
Copy link
Owner

Oh dear this does look like a bad footgun! If this crate releases a breaking change I'll be sure to try to fix this.

@Arkanayan
Copy link
Contributor Author

I understand, changing this would be a big decision. I just wanted to bring it to your notice. Thanks.

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

No branches or pull requests

2 participants