[niepce] rust: Use dyn for Trait objects
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] rust: Use dyn for Trait objects
- Date: Sat, 28 Sep 2019 04:44:45 +0000 (UTC)
commit f1afe9e8ceee925453fe5c4e17449ae10da1bbd0
Author: Hubert Figuière <hub figuiere net>
Date: Thu Sep 26 23:56:46 2019 -0400
rust: Use dyn for Trait objects
src/engine/library/op.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/library/op.rs b/src/engine/library/op.rs
index 0bd652d..f444d3c 100644
--- a/src/engine/library/op.rs
+++ b/src/engine/library/op.rs
@@ -1,7 +1,7 @@
/*
* niepce - engine/library/op.rs
*
- * Copyright (C) 2017 Hubert Figuière
+ * Copyright (C) 2017-2019 Hubert Figuière
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ use std::sync::Arc;
use engine::db::Library;
// When we can use a FnOnce here, we should.
-type Function = Fn(&Library) -> bool + Send + Sync + 'static;
+type Function = dyn Fn(&Library) -> bool + Send + Sync + 'static;
pub struct Op {
op: Arc<Function>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]