mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
Fix/suppress warnings
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
use actix_web::{web, Error as AWError};
|
||||
use failure::Error;
|
||||
use futures::{Future, TryFutureExt};
|
||||
use r2d2;
|
||||
use r2d2_sqlite;
|
||||
use rusqlite::{Statement, NO_PARAMS};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{thread::sleep, time::Duration};
|
||||
|
@ -22,6 +22,7 @@ mod db;
|
||||
use db::{Pool, Queries};
|
||||
|
||||
/// Version 1: Calls 4 queries in sequential order, as an asynchronous handler
|
||||
#[allow(clippy::eval_order_dependence)] // it's FP?
|
||||
async fn asyncio_weather(db: web::Data<Pool>) -> Result<HttpResponse, AWError> {
|
||||
let result = vec![
|
||||
db::execute(&db, Queries::GetTopTenHottestYears).await?,
|
||||
|
Reference in New Issue
Block a user