Skip to content

Commit

Permalink
Merge pull request #2352 from CosmWasm/aw/fix-warnings
Browse files Browse the repository at this point in the history
Fix warnings on nightly
  • Loading branch information
aumetra authored Jan 28, 2025
2 parents 7ef262e + 35d8c3a commit c365711
Show file tree
Hide file tree
Showing 20 changed files with 56 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/burner/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/crypto-verify/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/cyberpunk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/empty/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/floaty/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/hackatom/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/ibc-callbacks/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/ibc-reflect-send/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/ibc-reflect/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 32 additions & 8 deletions contracts/nested-contracts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/queue/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/reflect/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/staking/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/virus/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/go-gen/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn schema_object_type(
replace_custom_type(&replace_acronyms(
reference
.split('/')
.last()
.next_back()
.expect("split should always return at least one item"),
))
} else if let Some(t) = &schema.instance_type {
Expand Down Expand Up @@ -273,7 +273,7 @@ pub fn is_null(schema: &SchemaObject) -> bool {
schema
.instance_type
.as_ref()
.map_or(false, |s| s.contains(&InstanceType::Null))
.is_some_and(|s| s.contains(&InstanceType::Null))
}

pub fn documentation(schema: &SchemaObject) -> Option<String> {
Expand Down
2 changes: 1 addition & 1 deletion packages/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ base64 = "0.22.0"
bnum = "0.11.0"
cosmwasm-core = { version = "2.2.0-rc.1", path = "../core" }
cosmwasm-derive = { version = "2.2.0-rc.1", path = "../derive" }
derive_more = { version = "1.0.0-beta.6", default-features = false, features = [
derive_more = { version = "=1.0.0-beta.6", default-features = false, features = [
"debug",
] }
hex = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ mod _warning {
#[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"]
struct CompileWarning;

#[allow(dead_code)]
#[allow(dead_code, path_statements)]
fn trigger_warning() {
CompileWarning;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ cosmwasm-std = { version = "2.2.0-rc.1", path = "../std", default-features = fal
] }
cosmwasm-crypto = { version = "2.2.0-rc.1", path = "../crypto" }
cosmwasm-vm-derive = { version = "2.2.0-rc.1", path = "../vm-derive" }
derivative = "2"
derive_more = { version = "=1.0.0-beta.6", default-features = false, features = [
"debug",
] }
hex = "0.4"
rand_core = { version = "0.6", features = ["getrandom"] }
schemars = { workspace = true }
Expand Down
7 changes: 3 additions & 4 deletions packages/vm/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::ptr::NonNull;
use std::rc::Rc;
use std::sync::{Arc, RwLock};

use derivative::Derivative;
use derive_more::Debug;
use wasmer::{AsStoreMut, Instance as WasmerInstance, Memory, MemoryView, Value};
use wasmer_middlewares::metering::{get_remaining_points, set_remaining_points, MeteringPoints};

Expand Down Expand Up @@ -146,15 +146,14 @@ impl GasState {
///
/// The currently unused lifetime parameter 'a allows accessing referenced data in the debug implementation
/// without cloning it.
#[derive(Derivative)]
#[derivative(Debug)]
#[derive(Debug)]
#[non_exhaustive]
pub struct DebugInfo<'a> {
pub gas_remaining: u64,
// This field is just to allow us to add the unused lifetime parameter. It can be removed
// at any time.
#[doc(hidden)]
#[derivative(Debug = "ignore")]
#[debug(skip)]
pub(crate) __lifetime: PhantomData<&'a ()>,
}

Expand Down

0 comments on commit c365711

Please sign in to comment.