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
44842817
Commit
44842817
authored
Jan 16, 2019
by
Hero Bird
Browse files
[pdsl_core] Remove unneeded storage::Stash::new_unchecked
parent
29bd186e
Changes
2
Hide whitespace changes
Inline
Side-by-side
pdsl_core/src/storage/collections/stash/stash.rs
View file @
44842817
...
@@ -217,31 +217,6 @@ impl<T> parity_codec::Decode for Stash<T> {
...
@@ -217,31 +217,6 @@ impl<T> parity_codec::Decode for Stash<T> {
}
}
impl
<
T
>
Stash
<
T
>
{
impl
<
T
>
Stash
<
T
>
{
/// Creates a new storage stash for the given key.
///
/// # Safety
///
/// This is an inherently unsafe operation since it does not check
/// for the storage stash's invariances, such as
///
/// - Is the storage region determined by the given key aliasing?
/// - Is the storage region correctly formatted to be used as storage stash?
///
/// Users should not use this routine directly if possible.
pub
unsafe
fn
new_unchecked
(
next_key
:
Key
,
len_key
:
Key
,
max_len_key
:
Key
,
entries_key
:
Key
)
->
Self
{
Self
{
next_vacant
:
storage
::
Value
::
from_raw_parts
(
next_key
),
len
:
storage
::
Value
::
from_raw_parts
(
len_key
),
max_len
:
storage
::
Value
::
from_raw_parts
(
max_len_key
),
entries
:
SyncChunk
::
new_unchecked
(
entries_key
),
}
}
/// Allocates a new storage stash using the given storage allocator.
/// Allocates a new storage stash using the given storage allocator.
///
///
/// # Safety
/// # Safety
...
...
pdsl_core/src/storage/collections/vec/vec.rs
View file @
44842817
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
use
crate
::{
use
crate
::{
storage
::{
storage
::{
self
,
self
,
Key
,
chunk
::
SyncChunk
,
chunk
::
SyncChunk
,
Allocator
,
Allocator
,
},
},
...
...
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