@@ -4,7 +4,7 @@ pub use mysql_async::prelude::*;
44pub use mysql_async:: * ;
55use std:: convert:: Infallible ;
66use std:: net:: SocketAddr ;
7- use std:: result:: Result ;
7+ use std:: result:: Result as StdResult ;
88use std:: collections:: HashMap ;
99use serde:: { Deserialize , Serialize } ;
1010
@@ -57,7 +57,7 @@ impl Order {
5757 }
5858}
5959
60- async fn handle_request ( req : Request < Body > , pool : Pool ) -> Result < Response < Body > , anyhow:: Error > {
60+ async fn handle_request ( req : Request < Body > , pool : Pool ) -> StdResult < Response < Body > , anyhow:: Error > {
6161 match ( req. method ( ) , req. uri ( ) . path ( ) ) {
6262 ( & Method :: GET , "/" ) => Ok ( Response :: new ( Body :: from (
6363 "The valid endpoints are /init /create_order /create_orders /update_order /orders /delete_order" ,
@@ -216,7 +216,7 @@ fn response_build(body: &str) -> Response<Body> {
216216}
217217
218218#[ tokio:: main( flavor = "current_thread" ) ]
219- async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error + Send + Sync > > {
219+ async fn main ( ) -> StdResult < ( ) , Box < dyn std:: error:: Error + Send + Sync > > {
220220 let opts = Opts :: from_url ( & * get_url ( ) ) . unwrap ( ) ;
221221 let builder = OptsBuilder :: from_opts ( opts) ;
222222 // The connection pool will have a min of 5 and max of 10 connections.
0 commit comments