warp icon indicating copy to clipboard operation
warp copied to clipboard

Server::run should return ! (never type)

Open ia0 opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. One has to write unreachable!() after server.run().await.

Describe the solution you'd like I want Server::run() to return ! (never type):

pub async fn run(self, addr: impl Into<SocketAddr>) -> !;

Or, if run() may actually return (although its documentation says it doesn't), then update the documentation to explain when it can return.

Describe alternatives you've considered Writing unreachable!() manually.

ia0 avatar Oct 19 '23 13:10 ia0