Unverified Commit 4155ebe2 authored by Michael Müller's avatar Michael Müller Committed by GitHub
Browse files

Fix nightly clippy warnings (#925)

* Derive `Default`

* Fix `field is never read`
parent c2ea64b5
Pipeline #157979 passed with stages
in 32 minutes
......@@ -99,7 +99,7 @@ where
/// The internal Wasm32 raw pointer value.
///
/// Must not be readable or directly usable by any safe Rust code.
value: u32,
_value: u32,
/// We handle types like these as if the associated lifetime was exclusive.
marker: PhantomData<fn() -> &'a T>,
}
......@@ -111,7 +111,7 @@ where
/// Creates a new Wasm32 pointer for the given raw pointer value.
fn new(value: u32) -> Self {
Self {
value,
_value: value,
marker: Default::default(),
}
}
......@@ -142,7 +142,7 @@ where
/// The internal Wasm32 raw pointer value.
///
/// Must not be readable or directly usable by any safe Rust code.
value: u32,
_value: u32,
/// We handle types like these as if the associated lifetime was exclusive.
marker: PhantomData<fn() -> &'a mut T>,
}
......@@ -154,7 +154,7 @@ where
/// Creates a new Wasm32 pointer for the given raw pointer value.
fn new(value: u32) -> Self {
Self {
value,
_value: value,
marker: Default::default(),
}
}
......
......@@ -21,20 +21,12 @@ use super::{
};
/// A chunk of 256 bits.
#[derive(Debug, Copy, Clone, PartialEq, Eq, scale::Encode, scale::Decode)]
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, scale::Encode, scale::Decode)]
#[cfg_attr(feature = "std", derive(scale_info::TypeInfo))]
pub struct Bits256 {
bits: [Bits64; 4],
}
impl Default for Bits256 {
fn default() -> Self {
Self {
bits: Default::default(),
}
}
}
/// Iterator over the valid bits of a pack of 256 bits.
#[derive(Debug, Copy, Clone)]
pub struct Iter<'a> {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment