Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
ink
Commits
4155ebe2
Unverified
Commit
4155ebe2
authored
Sep 17, 2021
by
Michael Müller
Committed by
GitHub
Sep 17, 2021
Browse files
Fix nightly clippy warnings (#925)
* Derive `Default` * Fix `field is never read`
parent
c2ea64b5
Pipeline
#157979
passed with stages
in 32 minutes
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
crates/env/src/engine/on_chain/ext.rs
View file @
4155ebe2
...
...
@@ -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
(),
}
}
...
...
crates/storage/src/collections/bitvec/bits256.rs
View file @
4155ebe2
...
...
@@ -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
>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment