-
Notifications
You must be signed in to change notification settings - Fork 481
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
chore(core): fix nightly lints #4953
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warning: this function depends on never type fallback being `()` --> src/services/redis/backend.rs:438:5 | 438 | async fn append(&self, key: &str, value: &[u8]) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #123748 <rust-lang/rust#123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: FromRedisValue` will fail --> src/services/redis/backend.rs:442:22 | 442 | conn.append(key, value).await.map_err(format_redis_error)?; | ^^^^^^ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default Signed-off-by: xxchan <xxchan22f@gmail.com>
warning: the borrowed expression implements the required traits --> src/services/s3/backend.rs:1240:55 | 1240 | let mut err: Error = Error::new(kind, &format!("{i:?}")); | ^^^^^^^^^^^^^^^^^ help: change this to: `format!("{i:?}")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default warning: the borrowed expression implements the required traits --> src/services/dropbox/core.rs:437:29 | 437 | ... &format!("delete failed with error {} {}", error.tag, error_cause), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with error {} {}", error.tag, error_cause)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args warning: the borrowed expression implements the required traits --> src/services/dropbox/core.rs:446:25 | 446 | &format!("delete failed with unexpected tag {}", entry.tag), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with unexpected tag {}", entry.tag)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args Signed-off-by: xxchan <xxchan22f@gmail.com>
Xuanwo
reviewed
Aug 1, 2024
Xuanwo
approved these changes
Aug 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
ho-229
pushed a commit
to ho-229/incubator-opendal
that referenced
this pull request
Aug 6, 2024
* fix never type warning: this function depends on never type fallback being `()` --> src/services/redis/backend.rs:438:5 | 438 | async fn append(&self, key: &str, value: &[u8]) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #123748 <rust-lang/rust#123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: FromRedisValue` will fail --> src/services/redis/backend.rs:442:22 | 442 | conn.append(key, value).await.map_err(format_redis_error)?; | ^^^^^^ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default Signed-off-by: xxchan <xxchan22f@gmail.com> * fix needless borrow warning: the borrowed expression implements the required traits --> src/services/s3/backend.rs:1240:55 | 1240 | let mut err: Error = Error::new(kind, &format!("{i:?}")); | ^^^^^^^^^^^^^^^^^ help: change this to: `format!("{i:?}")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default warning: the borrowed expression implements the required traits --> src/services/dropbox/core.rs:437:29 | 437 | ... &format!("delete failed with error {} {}", error.tag, error_cause), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with error {} {}", error.tag, error_cause)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args warning: the borrowed expression implements the required traits --> src/services/dropbox/core.rs:446:25 | 446 | &format!("delete failed with unexpected tag {}", entry.tag), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("delete failed with unexpected tag {}", entry.tag)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args Signed-off-by: xxchan <xxchan22f@gmail.com> --------- Signed-off-by: xxchan <xxchan22f@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #.
Rationale for this change
What changes are included in this PR?
Lint errors are included in the commit message.
Are there any user-facing changes?