From 9829bbfcd57c57e237c6aacb96a78d0b9f5bab68 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Tue, 29 Jun 2021 22:44:11 -0600 Subject: lol no generics --- src/db/migration/change.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/db/migration/change.rs') diff --git a/src/db/migration/change.rs b/src/db/migration/change.rs index 8bb8bf6..a07ef24 100644 --- a/src/db/migration/change.rs +++ b/src/db/migration/change.rs @@ -1,6 +1,6 @@ -use diesel::Connection; +use diesel::Connection as _; -use crate::db::backend::Connectable; +use crate::db::backend::{Connection, SqlGenerator}; use crate::db::models::Field; pub enum DatabaseChange { @@ -12,7 +12,7 @@ pub enum DatabaseChange { } impl DatabaseChange { - pub fn apply(&self, app_name: &str, connection: &C::Connection) { + pub fn apply(&self, app_name: &str, connection: &Connection) { use barrel::{types, Migration, Table}; match self { @@ -55,7 +55,7 @@ impl DatabaseChange { m.create_table(table_name, callback); } - connection.execute(&m.make::()).unwrap(); + connection.execute(&m.make::()).unwrap(); } } } -- cgit v1.2.3