Skip to content

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

@HaoliangXu

Description

@HaoliangXu

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions