File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,21 @@ async fn root_handler() -> &'static str {
5252 "I'm Alive :D"
5353}
5454
55+ #[ expect( clippy:: absolute_paths, reason = "use one-time only" ) ]
56+ fn main ( ) -> Result < ( ) , Error > {
57+ tokio:: runtime:: Builder :: new_current_thread ( )
58+ . enable_all ( )
59+ . build ( ) ?
60+ . block_on ( async { tokio_main ( ) . await } )
61+ }
62+
5563#[ expect(
5664 clippy:: integer_division_remainder_used,
5765 reason = "Because clippy is not happy with the tokio::select macro #1"
5866) ]
59- #[ tokio:: main( flavor = "current_thread" ) ]
6067#[ instrument]
61- async fn main ( ) -> Result < ( ) , Error > {
68+ /// Entrypoint executed by the tokio runtime
69+ async fn tokio_main ( ) -> Result < ( ) , Error > {
6270 // Configure tracing_subscriber with a custom formatter
6371 #[ expect( clippy:: absolute_paths, reason = "Only call to this function" ) ]
6472 tracing_subscriber:: fmt ( )
You can’t perform that action at this time.
0 commit comments