Skip to content

Commit aedec0f

Browse files
committed
More test fixes
1 parent e6c636e commit aedec0f

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

diesel/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
// For the `specialization` feature.
9696
#![cfg_attr(feature = "unstable", allow(incomplete_features))]
9797
// Built-in Lints
98-
//#![deny(warnings)]
98+
#![deny(warnings)]
9999
#![warn(
100100
missing_debug_implementations,
101101
missing_copy_implementations,

diesel/src/mysql/types/date_and_time.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ mod tests {
156156
extern crate dotenv;
157157

158158
use self::chrono::{Duration, NaiveDate, NaiveTime, Utc};
159-
use self::dotenv::dotenv;
160159

161160
use crate::dsl::{now, sql};
162161
use crate::prelude::*;

diesel_cli/tests/migration_run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn migration_run_inserts_run_on_timestamps() {
8888
"EXISTS (SELECT 1 FROM __diesel_schema_migrations \
8989
WHERE run_on < NOW() + INTERVAL 1 HOUR)",
9090
))
91-
.get_result(&db.conn())
91+
.get_result(&mut db.conn())
9292
.unwrap()
9393
}
9494

diesel_cli/tests/support/mysql_database.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl Database {
1414

1515
pub fn create(self) -> Self {
1616
let (database, mysql_url) = self.split_url();
17-
let conn = MysqlConnection::establish(&mysql_url).unwrap();
17+
let mut conn = MysqlConnection::establish(&mysql_url).unwrap();
1818
conn.execute(&format!("CREATE DATABASE `{}`", database))
1919
.unwrap();
2020
self
@@ -33,7 +33,7 @@ impl Database {
3333
AND table_schema = DATABASE())",
3434
table
3535
)))
36-
.get_result(&self.conn())
36+
.get_result(&mut self.conn())
3737
.unwrap()
3838
}
3939

@@ -59,7 +59,7 @@ impl Database {
5959
impl Drop for Database {
6060
fn drop(&mut self) {
6161
let (database, mysql_url) = self.split_url();
62-
let conn = try_drop!(
62+
let mut conn = try_drop!(
6363
MysqlConnection::establish(&mysql_url),
6464
"Couldn't connect to database"
6565
);

0 commit comments

Comments
 (0)