Skip to content

Commit bfbe86b

Browse files
committed
Clean up warnings in integration tests
At least one of these had become a hard error in the most recent beta
1 parent 8549f5c commit bfbe86b

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

diesel_tests/tests/annotations.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn association_where_parent_and_child_have_underscores() {
3232
#[derive(PartialEq, Eq, Debug, Clone, Queryable, Identifiable)]
3333
#[has_many(special_comments)]
3434
#[belongs_to(User)]
35-
struct SpecialPost {
35+
pub struct SpecialPost {
3636
id: i32,
3737
user_id: i32,
3838
title: String
@@ -92,7 +92,6 @@ fn association_where_parent_and_child_have_underscores() {
9292
// This module has no test functions, as it's only to test compilation.
9393
mod associations_can_have_nullable_foreign_keys {
9494
#![allow(dead_code)]
95-
use diesel::prelude::*;
9695

9796
table! {
9897
foos{
@@ -146,7 +145,9 @@ mod lifetimes_with_names_other_than_a {
146145
}
147146

148147
mod custom_foreign_keys_are_respected_on_belongs_to {
149-
use schema::{users, User};
148+
#![allow(dead_code)]
149+
150+
use schema::User;
150151

151152
table! { special_posts { id -> Integer, author_id -> Integer, } }
152153

diesel_tests/tests/associations.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ fn grouping_associations_maintains_ordering() {
107107
assert_eq!(expected_data, users_and_posts);
108108
}
109109

110+
#[test]
110111
fn associations_can_be_grouped_multiple_levels_deep() {
111112
// I'm manually defining the data rather than loding from the database here,
112113
// as it makes the tests *way* more readable if I omit setup here. This is

diesel_tests/tests/postgres_specific_schema.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use diesel::*;
2-
use super::{User, posts, comments, users};
1+
use super::{User, posts, comments};
32

43
#[derive(PartialEq, Eq, Debug, Clone, Queryable, Identifiable)]
54
#[has_many(comments)]

diesel_tests/tests/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ fn text_array_can_be_assigned_to_varchar_array_column() {
404404
#[cfg(feature = "postgres")]
405405
fn third_party_crates_can_add_new_types() {
406406
use std::error::Error;
407-
use std::io::prelude::*;
408407

409408
struct MyInt;
410409

0 commit comments

Comments
 (0)