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

Upgrade rust toolchain to 1.75.0 #53

Open
wants to merge 2 commits into
base: txn
Choose a base branch
from

Conversation

eval-exec
Copy link

@eval-exec eval-exec commented Jul 16, 2024

  • Upgrade rust-toolchain to 1.75.0
  • Apply cargo-clippy's suggestions
    Checking ckb-rocksdb v0.21.1 (/home/exec/Projects/github.com/nervosnetwork/rust-rocksdb)
error: accessing first element with `info.get(0)`
   --> src/backup.rs:394:29
    |
394 |             let backup_id = info.get(0).unwrap().backup_id;
    |                             ^^^^^^^^^^^ help: try: `info.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-D clippy::get-first` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::get_first)]`

error: casting raw pointers to the same type and constness is unnecessary (`*const u8` -> `*const u8`)
   --> src/merge_operator.rs:209:21
    |
209 |                     *(ptr as *const *const u8) as *const u8,
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `*(ptr as *const *const u8)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unnecessary_cast)]`

error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/ops/multi_get.rs:286:22
    |
286 |                 .zip(errors.into_iter())
    |                      ^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `errors`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /home/exec/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:643:12
    |
643 |         U: IntoIterator,
    |            ^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-D clippy::useless-conversion` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`

error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/ops/multi_get.rs:310:14
    |
310 |         .zip(values_sizes.into_iter())
    |              ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `values_sizes`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /home/exec/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:643:12
    |
643 |         U: IntoIterator,
    |            ^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

error: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/ops/multi_get.rs:311:14
    |
311 |         .zip(errors.into_iter())
    |              ^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `errors`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /home/exec/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:643:12
    |
643 |         U: IntoIterator,
    |            ^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

error: could not compile `ckb-rocksdb` (lib test) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `ckb-rocksdb` (lib) due to 4 previous errors
make: *** [Makefile:3: clippy] Error 101

@eval-exec eval-exec changed the title Exec/upgrade rust toolchain to 1.75.0 Upgrade rust toolchain to 1.75.0 Jul 16, 2024
@eval-exec eval-exec force-pushed the exec/upgrade-rust-toolchain-to_1.75.0 branch from 72b0626 to ebbcad9 Compare July 16, 2024 10:46
@doitian
Copy link
Member

doitian commented Jul 18, 2024

There are some errors: db does not live long enough

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

Successfully merging this pull request may close these issues.

2 participants