Skip to content

Commit 42aa9c2

Browse files
committed
Fix warnings on nightly
1 parent 7ef262e commit 42aa9c2

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/go-gen/src/schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn schema_object_type(
6262
replace_custom_type(&replace_acronyms(
6363
reference
6464
.split('/')
65-
.last()
65+
.next_back()
6666
.expect("split should always return at least one item"),
6767
))
6868
} else if let Some(t) = &schema.instance_type {
@@ -273,7 +273,7 @@ pub fn is_null(schema: &SchemaObject) -> bool {
273273
schema
274274
.instance_type
275275
.as_ref()
276-
.map_or(false, |s| s.contains(&InstanceType::Null))
276+
.is_some_and(|s| s.contains(&InstanceType::Null))
277277
}
278278

279279
pub fn documentation(schema: &SchemaObject) -> Option<String> {

packages/std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ base64 = "0.22.0"
6161
bnum = "0.11.0"
6262
cosmwasm-core = { version = "2.2.0-rc.1", path = "../core" }
6363
cosmwasm-derive = { version = "2.2.0-rc.1", path = "../derive" }
64-
derive_more = { version = "1.0.0-beta.6", default-features = false, features = [
64+
derive_more = { version = "1.0.0", default-features = false, features = [
6565
"debug",
6666
] }
6767
hex = "0.4"

packages/std/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ mod _warning {
125125
#[must_use = "cosmwasm-std feature `abort` is deprecated and will be removed in the next major release. You can just remove the feature as this functionality is now the default"]
126126
struct CompileWarning;
127127

128-
#[allow(dead_code)]
128+
#[allow(dead_code, path_statements)]
129129
fn trigger_warning() {
130130
CompileWarning;
131131
}

packages/vm/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ cosmwasm-std = { version = "2.2.0-rc.1", path = "../std", default-features = fal
5252
] }
5353
cosmwasm-crypto = { version = "2.2.0-rc.1", path = "../crypto" }
5454
cosmwasm-vm-derive = { version = "2.2.0-rc.1", path = "../vm-derive" }
55-
derivative = "2"
55+
derive_more = { version = "1.0.0", default-features = false, features = [
56+
"debug",
57+
] }
5658
hex = "0.4"
5759
rand_core = { version = "0.6", features = ["getrandom"] }
5860
schemars = { workspace = true }

packages/vm/src/environment.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::ptr::NonNull;
66
use std::rc::Rc;
77
use std::sync::{Arc, RwLock};
88

9-
use derivative::Derivative;
9+
use derive_more::Debug;
1010
use wasmer::{AsStoreMut, Instance as WasmerInstance, Memory, MemoryView, Value};
1111
use wasmer_middlewares::metering::{get_remaining_points, set_remaining_points, MeteringPoints};
1212

@@ -146,15 +146,14 @@ impl GasState {
146146
///
147147
/// The currently unused lifetime parameter 'a allows accessing referenced data in the debug implementation
148148
/// without cloning it.
149-
#[derive(Derivative)]
150-
#[derivative(Debug)]
149+
#[derive(Debug)]
151150
#[non_exhaustive]
152151
pub struct DebugInfo<'a> {
153152
pub gas_remaining: u64,
154153
// This field is just to allow us to add the unused lifetime parameter. It can be removed
155154
// at any time.
156155
#[doc(hidden)]
157-
#[derivative(Debug = "ignore")]
156+
#[debug(skip)]
158157
pub(crate) __lifetime: PhantomData<&'a ()>,
159158
}
160159

0 commit comments

Comments
 (0)