Various clippy fixes. (#403)

This commit is contained in:
Dan Gohman
2019-10-09 13:32:52 -07:00
committed by GitHub
parent 9465668199
commit fd3efad781
25 changed files with 144 additions and 160 deletions

View File

@@ -61,7 +61,7 @@ impl MemoryStyle {
// it static.
assert!(tunables.static_memory_bound >= memory.minimum);
return (
MemoryStyle::Static {
Self::Static {
bound: tunables.static_memory_bound,
},
tunables.static_memory_offset_guard_size,
@@ -70,10 +70,7 @@ impl MemoryStyle {
}
// Otherwise, make it dynamic.
(
MemoryStyle::Dynamic,
tunables.dynamic_memory_offset_guard_size,
)
(Self::Dynamic, tunables.dynamic_memory_offset_guard_size)
}
}
@@ -111,7 +108,7 @@ pub enum TableStyle {
impl TableStyle {
/// Decide on an implementation style for the given `Table`.
pub fn for_table(_table: Table, _tunables: &Tunables) -> Self {
TableStyle::CallerChecksSignature
Self::CallerChecksSignature
}
}