@@ -4,7 +4,7 @@ pub use mysql_async::prelude::*;
4
4
pub use mysql_async:: * ;
5
5
use std:: convert:: Infallible ;
6
6
use std:: net:: SocketAddr ;
7
- use std:: result:: Result ;
7
+ use std:: result:: Result as StdResult ;
8
8
use std:: collections:: HashMap ;
9
9
use serde:: { Deserialize , Serialize } ;
10
10
@@ -57,7 +57,7 @@ impl Order {
57
57
}
58
58
}
59
59
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 > {
61
61
match ( req. method ( ) , req. uri ( ) . path ( ) ) {
62
62
( & Method :: GET , "/" ) => Ok ( Response :: new ( Body :: from (
63
63
"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> {
216
216
}
217
217
218
218
#[ 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 > > {
220
220
let opts = Opts :: from_url ( & * get_url ( ) ) . unwrap ( ) ;
221
221
let builder = OptsBuilder :: from_opts ( opts) ;
222
222
// The connection pool will have a min of 5 and max of 10 connections.
0 commit comments