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

Address cargo clippy warnings #32

Closed
dongsupark opened this issue Nov 24, 2023 · 1 comment · Fixed by #36
Closed

Address cargo clippy warnings #32

dongsupark opened this issue Nov 24, 2023 · 1 comment · Fixed by #36
Assignees
Labels
kind/feature A feature request.

Comments

@dongsupark
Copy link
Member

Run cargo clippy once, and update the code following the suggestions.
Most of them should be straightforwards.

However, a tricky thing is an Error type mismatch like that.

warning: useless use of `format!`
   --> src/bin/download_sysext.rs:440:36
    |
440 |                 None => return Err(format!("Either --input-xml or --payload-url must be given.").into()),
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help:  consider using `.to_string()`: `"Either --input-xml or --payload-url must be given.".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Changing that to to_string as suggested, the whole main function would fall into a strange state of type conflicts of different error types.
I have seen this issue since days, but so far could not fix that.

@dongsupark dongsupark added the kind/feature A feature request. label Nov 24, 2023
@dongsupark dongsupark self-assigned this Nov 27, 2023
@dongsupark
Copy link
Member Author

The error type conflict mentioned here is now resolved in #29.

Will create a separate PR for fixing the other clippy warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant