mirror of
https://github.com/fluencelabs/interface-types
synced 2025-06-25 12:41:39 +00:00
chore(interface-types) Simplify the code.
This commit is contained in:
@ -54,7 +54,7 @@ pub(crate) mod tests {
|
||||
|
||||
impl wasm::structures::LocalImport for LocalImport {
|
||||
fn inputs_cardinality(&self) -> usize {
|
||||
self.inputs.len() as usize
|
||||
self.inputs.len()
|
||||
}
|
||||
|
||||
fn outputs_cardinality(&self) -> usize {
|
||||
@ -82,7 +82,7 @@ pub(crate) mod tests {
|
||||
impl Deref for MemoryView {
|
||||
type Target = [Cell<u8>];
|
||||
|
||||
fn deref(&self) -> &[Cell<u8>] {
|
||||
fn deref(&self) -> &Self::Target {
|
||||
self.0.as_slice()
|
||||
}
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ impl MemoryView for EmptyMemoryView {}
|
||||
impl Deref for EmptyMemoryView {
|
||||
type Target = [Cell<u8>];
|
||||
|
||||
fn deref(&self) -> &[Cell<u8>] {
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&[]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user