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.67.1 #48

Merged
merged 4 commits into from
May 23, 2023

Conversation

eval-exec
Copy link

@eval-exec eval-exec commented May 17, 2023

error: method `default` can be confused for the standard trait method `std::default::Default::default`
   --> src/db_options.rs:132:5
    |
132 | /     pub fn default() -> Result<Self, Error> {
133 | |         let env = unsafe { ffi::rocksdb_create_default_env() };
134 | |         if env.is_null() {
135 | |             Err(Error::new("Could not create mem env".to_owned()))
...   |
138 | |         }
139 | |     }
    | |_____^
    |
    = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
    = note: `-D clippy::should-implement-trait` implied by `-D warnings`

Request for review. @zhangsoledad
Note: libc::size_t is a type alias of usize:
https://github.com/rust-lang/libc/blob/586541b97e047cfec540fad752bc1eaca4acac36/src/unix/mod.rs#L19

@eval-exec eval-exec marked this pull request as ready for review May 17, 2023 09:22
@@ -129,7 +129,7 @@ impl Drop for EnvWrapper {

impl Env {
/// Returns default env
pub fn default() -> Result<Self, Error> {
pub fn default_env() -> Result<Self, Error> {
Copy link
Author

@eval-exec eval-exec May 17, 2023

Choose a reason for hiding this comment

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

I rename Env::default() to Env::default_env(), because:

error: method `default` can be confused for the standard trait method `std::default::Default::default`
   --> src/db_options.rs:132:5
    |
132 | /     pub fn default() -> Result<Self, Error> {
133 | |         let env = unsafe { ffi::rocksdb_create_default_env() };
134 | |         if env.is_null() {
135 | |             Err(Error::new("Could not create mem env".to_owned()))
...   |
138 | |         }
139 | |     }
    | |_____^
    |
    = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
    = note: `-D clippy::should-implement-trait` implied by `-D warnings`

@eval-exec eval-exec marked this pull request as draft May 17, 2023 10:16
@eval-exec
Copy link
Author

I forget to update rust-toolchains in CI workflows

@eval-exec eval-exec marked this pull request as ready for review May 17, 2023 10:18
@eval-exec eval-exec requested a review from zhangsoledad May 17, 2023 10:18
@zhangsoledad zhangsoledad merged commit 983beef into nervosnetwork:txn May 23, 2023
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.

3 participants