chiark / gitweb /
daemon: Fix many errors (OER rather than OE)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 30 Jan 2021 23:46:14 +0000 (23:46 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 Jan 2021 00:40:56 +0000 (00:40 +0000)
commit6143ace1a042c6c63ece2649ca7d5dce2139d742
tree3a489e95421f41a1421a1b97cb05ddb956664f47
parent6a8c54ca4ef33e40b4014dee3f211d24d09bdc25
daemon: Fix many errors (OER rather than OE)

Firstly, all these functions shuuld throw OER which is the thing which
implements the Rocket Responder trait, so that the error actually goes
back to the client.

Secondly, they all need ?.  Without that, these functions all always
succeed and always return Result::Ok(some Result<, OE[R]>).
Surprisingly this is accepted, because Result<> impl Responder
and apparently Result<Result<..>> does too!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/api.rs
daemon/main.rs