Suggestions for Capella execution_layer (#3983)

* Restrict Engine::request to FnOnce

* Use `Into::into`

* Impl IntoIterator for VariableList

* Use Instant rather than SystemTime
This commit is contained in:
Paul Hauner
2023-02-17 11:58:33 +11:00
committed by GitHub
parent 461bda6e85
commit 4aa8a2ab12
5 changed files with 17 additions and 25 deletions

View File

@@ -176,6 +176,15 @@ impl<'a, T, N: Unsigned> IntoIterator for &'a VariableList<T, N> {
}
}
impl<T, N: Unsigned> IntoIterator for VariableList<T, N> {
type Item = T;
type IntoIter = std::vec::IntoIter<T>;
fn into_iter(self) -> Self::IntoIter {
self.vec.into_iter()
}
}
impl<T, N: Unsigned> tree_hash::TreeHash for VariableList<T, N>
where
T: tree_hash::TreeHash,