syncstorage-rs icon indicating copy to clipboard operation
syncstorage-rs copied to clipboard

refactor: implemented wrap_fn for middlewares, clippy warnings on Eq, manual_range_contains

Open taddes opened this issue 1 year ago • 0 comments

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

taddes avatar Aug 15 '22 21:08 taddes