Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(core): fix nightly lints #4953

Merged
merged 2 commits into from
Aug 1, 2024
Merged

chore(core): fix nightly lints #4953

merged 2 commits into from
Aug 1, 2024

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Aug 1, 2024

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?

xxchan added 2 commits August 1, 2024 22:38
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>
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo Xuanwo merged commit 6537d25 into apache:main Aug 1, 2024
92 checks passed
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>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants