Plume/src
Igor Galić 3d27e283ad
add enum containing all successful route returns (#614)
* add enum containing all successful route returns

This enum derives `Responder`, so it can be used as route result.
We also implement `From`, so it can be converted

* disable clippy warning about this enum

There's no use trying to chase this warning.
The next warning will be about `Redirect`, which itself is 360 byte,
according to @fdb-hiroshima (thanks for the research!)

So, if anything, we can try to get Rocket to work on that!

* refactor routes/posts to only use one level of Result

* admin settings error is not an ErrorPage, so dont use Result<>

* refactor: use early return to remove indent of main logic

This diff is absolutely atrocious.
but the resulting readability is worth it

* refactor routes/post for early returns & RespondOrRedirect

* refactor routes/session for early returns & use RespondOrRedirect

* refactor routes/user -- add another field to enum

* refactor routes/blogs for early returns & RespondOrRedirect

* refactor routes/blogs for early returns & RespondOrRedirect

This is a final refactor of `pub fn update()` for readability.
We're removing at least one indentation level.
2019-06-14 09:33:30 +02:00
..
api cache local instance (#572) 2019-05-10 21:59:34 +01:00
routes add enum containing all successful route returns (#614) 2019-06-14 09:33:30 +02:00
inbox.rs Big refactoring of the Inbox (#443) 2019-04-17 18:31:47 +01:00
mail.rs Grammar corrections followup to #510 (#512) 2019-04-02 14:08:07 +01:00
main.rs refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) 2019-05-25 19:23:45 +01:00
template_utils.rs Add some feedback when performing some actions (#552) 2019-04-30 11:04:25 +01:00
test_routes.rs Add tests for plume webserver (#513) 2019-04-06 17:41:57 +02:00