chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb11fe7
)
Make op::Core a supertrait of op::Complex, not op::Simple
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 27 Feb 2021 17:39:29 +0000
(17:39 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 27 Feb 2021 17:39:29 +0000
(17:39 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/api.rs
patch
|
blob
|
history
diff --git
a/daemon/api.rs
b/daemon/api.rs
index 3d865f4e6283db65234f2906ab82fb8abaa727b4..84d8f32584f74add80e9ae8d2ee17cb18331bafe 100644
(file)
--- a/
daemon/api.rs
+++ b/
daemon/api.rs
@@
-47,7
+47,7
@@
mod op {
}
}
- pub trait Simple:
Core +
Debug {
+ pub trait Simple: Debug {
#[throws(ApiPieceOpError)]
fn op(&self, a: ApiPieceOpArgs) -> PieceUpdate;
}
@@
-57,7
+57,7
@@
mod op {
fn op_complex(&self, a: ApiPieceOpArgs) -> UpdateFromOpComplex;
}
- impl<T> Complex for T where T: Simple {
+ impl<T> Complex for T where T:
Core +
Simple {
#[throws(ApiPieceOpError)]
fn op_complex(&self, a: ApiPieceOpArgs) -> UpdateFromOpComplex {
(self.op(a)?, vec![])