Skip to content

Commit fcd3b43

Browse files
authored
Merge pull request #28 from jokemanfire/dev
2 parents f5b1157 + 71e9a9c commit fcd3b43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub use mysql_async::prelude::*;
44
pub use mysql_async::*;
55
use std::convert::Infallible;
66
use std::net::SocketAddr;
7-
use std::result::Result;
7+
use std::result::Result as StdResult;
88
use std::collections::HashMap;
99
use 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

Comments
 (0)