zero2prod icon indicating copy to clipboard operation
zero2prod copied to clipboard

Hi, do you know how to make a function returning a tower service builder?

Open HaoliangXu opened this issue 1 year ago • 2 comments

https://github.com/SaadiSave/zero2prod/blob/main/src/startup.rs in this file, I feel that putting this trunk of code in Axum runner function is to noisy, makes it hard to read, so I like the idea of leaving the service builder in another function but making another function has its own problem, how to put the right return type on the function signature?

HaoliangXu avatar May 07 '23 01:05 HaoliangXu