Skip to content

Commit b049a1e

Browse files
committed
Bump clippy, actually run UI tests
1 parent 79eced6 commit b049a1e

16 files changed

Lines changed: 23 additions & 19 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ matrix:
4343
- rust: nightly
4444
- rust: beta
4545
include:
46-
- rust: nightly-2017-11-28
46+
- rust: nightly-2018-02-02
4747
env: CLIPPY_AND_COMPILE_TESTS=YESPLEASE
4848
script:
4949
- (cd diesel && cargo rustc --no-default-features --features "lint unstable sqlite postgres mysql extras" -- -Zno-trans)

diesel/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ byteorder = "1.0"
1616
diesel_derives = { version = "1.1.0" }
1717
diesel_derives2 = { path = "../diesel_derives2" }
1818
chrono = { version = "0.4", optional = true }
19-
clippy = { optional = true, version = "=0.0.174" }
19+
clippy = { optional = true, version = "=0.0.185" }
2020
libc = { version = "0.2.0", optional = true }
2121
libsqlite3-sys = { version = ">=0.8.0, <0.10.0", optional = true, features = ["min_sqlite_version_3_7_16"] }
2222
mysqlclient-sys = { version = ">=0.1.0, <0.3.0", optional = true }

diesel/src/connection/statement_cache.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,14 @@ pub struct StatementCache<DB: Backend, Statement> {
108108
pub cache: RefCell<HashMap<StatementCacheKey<DB>, Statement>>,
109109
}
110110

111-
#[cfg_attr(feature = "clippy", allow(len_without_is_empty))]
111+
#[cfg_attr(feature = "clippy", allow(len_without_is_empty, new_without_default_derive))]
112112
impl<DB, Statement> StatementCache<DB, Statement>
113113
where
114114
DB: Backend,
115115
DB::TypeMetadata: Clone,
116116
DB::QueryBuilder: Default,
117117
StatementCacheKey<DB>: Hash + Eq,
118118
{
119-
#[cfg_attr(feature = "clippy", allow(new_without_default_derive))]
120119
pub fn new() -> Self {
121120
StatementCache {
122121
cache: RefCell::new(HashMap::new()),

diesel/src/pg/types/uuid.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ impl ToSql<Uuid, Pg> for uuid::Uuid {
3131
#[test]
3232
fn uuid_to_sql() {
3333
let mut bytes = Output::test();
34-
let test_uuid = uuid::Uuid::from_fields(4_294_967_295, 65_535, 65_535, b"abcdef12").unwrap();
34+
let test_uuid = uuid::Uuid::from_fields(0xFFFF_FFFF, 0xFFFF, 0xFFFF, b"abcdef12").unwrap();
3535
ToSql::<Uuid, Pg>::to_sql(&test_uuid, &mut bytes).unwrap();
3636
assert_eq!(bytes, test_uuid.as_bytes());
3737
}
3838

3939
#[test]
4040
fn some_uuid_from_sql() {
41-
let input_uuid = uuid::Uuid::from_fields(4_294_967_295, 65_535, 65_535, b"abcdef12").unwrap();
41+
let input_uuid = uuid::Uuid::from_fields(0xFFFF_FFFF, 0xFFFF, 0xFFFF, b"abcdef12").unwrap();
4242
let output_uuid = FromSql::<Uuid, Pg>::from_sql(Some(input_uuid.as_bytes())).unwrap();
4343
assert_eq!(input_uuid, output_uuid);
4444
}

diesel/src/query_builder/bind_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ pub struct RawBytesBindCollector<DB: Backend + TypeMetadata> {
4242
pub binds: Vec<Option<Vec<u8>>>,
4343
}
4444

45+
#[cfg_attr(feature = "clippy", allow(new_without_default_derive))]
4546
impl<DB: Backend + TypeMetadata> RawBytesBindCollector<DB> {
46-
#[cfg_attr(feature = "clippy", allow(new_without_default_derive))]
4747
/// Construct an empty `RawBytesBindCollector`
4848
pub fn new() -> Self {
4949
RawBytesBindCollector {

diesel_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ clap = "2.27"
2020
diesel = { version = "1.1.0", default-features = false }
2121
dotenv = ">=0.8, <0.11"
2222
infer_schema_internals = { version = "1.1.0" }
23-
clippy = { optional = true, version = "=0.0.174" }
23+
clippy = { optional = true, version = "=0.0.185" }
2424
migrations_internals = { version = "1.1.0" }
2525
url = { version = "1.4.0", optional = true }
2626

diesel_compile_tests/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ authors = ["Sean Griffin <sean@seantheprogrammer.com>"]
66
[workspace]
77

88
[dependencies]
9-
diesel = { version = "1.1.0", features = ["extras", "sqlite", "postgres", "mysql"] }
10-
compiletest_rs = "=0.3.3"
9+
diesel = { version = "1.1.0", features = ["extras", "sqlite", "postgres", "mysql", "unstable"] }
10+
compiletest_rs = "=0.3.6"
1111

1212
[replace]
1313
"diesel:1.1.1" = { path = "../diesel" }

diesel_compile_tests/tests/compile_tests.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ fn run_mode(mode: &'static str) {
2121
}
2222

2323
#[test]
24-
fn compile_test() {
24+
fn compile_fail() {
2525
run_mode("compile-fail");
2626
}
27+
28+
#[test]
29+
fn ui() {
30+
run_mode("ui")
31+
}

diesel_derives/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/diesel-rs/diesel/tree/master/diesel_derives"
1111
[dependencies]
1212
syn = { version = "0.11.4", features = ["aster"] }
1313
quote = "0.3.12"
14-
clippy = { optional = true, version = "=0.0.174" }
14+
clippy = { optional = true, version = "=0.0.185" }
1515

1616
[dev-dependencies]
1717
dotenv = { version = ">=0.8, <0.11", default-features = false }

diesel_derives2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/diesel-rs/diesel/tree/master/diesel_derives"
1111
[dependencies]
1212
syn = { version = "0.12.0", features = ["full"] }
1313
quote = "0.4"
14-
clippy = { optional = true, version = "=0.0.174" }
14+
clippy = { optional = true, version = "=0.0.185" }
1515
proc-macro2 = "0.2.0"
1616

1717
[dev-dependencies]

0 commit comments

Comments
 (0)