Skip to content

Commit

Permalink
Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
NChitty committed Jan 15, 2024
1 parent 4a60d8d commit 7728227
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lambda/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::future::Future;
use uuid::Uuid;

pub mod recipe;
pub mod services;

pub trait Repository<T>: Send + Sync {
async fn find_by_id(&self, id: Uuid) -> Option<T>;
fn find_by_id(&self, id: Uuid) -> impl Future<Output = Option<T>>;
}
4 changes: 2 additions & 2 deletions lambda/src/services/recipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use axum::extract::{Path, State};
use axum::http::StatusCode;
use axum::Json;
use sqlx::postgres::PgPoolOptions;
use sqlx::{Error, PgPool, Postgres};
use sqlx::{Error, PgPool};
use uuid::Uuid;

use crate::recipe::Recipe;
Expand All @@ -20,7 +20,7 @@ pub(super) struct PostgresRecipeRepository {
}

impl PostgresRecipeRepository {
pub(super) async fn new(url: &str) -> Self {
pub(super) async fn new(url: &String) -> Self {
let pool: PgPool = PgPoolOptions::new()
.max_connections(5)
.acquire_timeout(Duration::from_secs(3))
Expand Down

0 comments on commit 7728227

Please sign in to comment.