syncstorage-rs
syncstorage-rs copied to clipboard
refactor: implemented wrap_fn for middlewares, clippy warnings on Eq, manual_range_contains
Description
Implemented middleware with wrap_fn()
to remove significant boilerplate. Moved bodies of Service::call()
methods into the function body of wrap_fn
and registered it in mod.rs
, which passes in the service and request. Each middleware contains its own logic scoped to the individual module.
Also made some minor refactors due to clippy warnings for Eq
and the manual_range_contains warning which I had not yet seen. Hopefully it is relatively clear given the range check.
Testing
Compilation, clarity.
Issue(s)
Closes #714