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

@@ -341,7 +341,7 @@ impl Engine {
/// deadlock.
pub async fn request<'a, F, G, H>(self: &'a Arc<Self>, func: F) -> Result<H, EngineError>
where
F: Fn(&'a Engine) -> G,
F: FnOnce(&'a Engine) -> G,
G: Future<Output = Result<H, EngineApiError>>,
{
match func(self).await {