From fdc50aa3b1420d6bace0b80f26bd9f133a420364 Mon Sep 17 00:00:00 2001 From: Ted Driggs Date: Wed, 2 Oct 2024 09:05:35 -0700 Subject: [PATCH] Remove prettyassertions This has a transitive dependency that broke MSRV support --- derive_builder/Cargo.toml | 1 - derive_builder/tests/builder_field_custom.rs | 2 -- derive_builder/tests/builder_name.rs | 2 -- .../compile-fail/rename_setter_struct_level.rs | 14 +++++++------- derive_builder/tests/custom_constructor.rs | 2 -- derive_builder/tests/custom_default.rs | 2 -- derive_builder/tests/generic_structs.rs | 2 -- derive_builder/tests/generic_with_default.rs | 2 -- derive_builder/tests/lifetime.rs | 2 -- derive_builder/tests/setter_custom.rs | 2 -- derive_builder/tests/setter_extend.rs | 2 -- derive_builder/tests/setter_into.rs | 2 -- derive_builder/tests/setter_name.rs | 2 -- derive_builder/tests/setter_pattern.rs | 2 -- derive_builder/tests/setter_prefix.rs | 2 -- derive_builder/tests/setter_strip_option.rs | 2 -- derive_builder/tests/setter_visibility.rs | 2 -- derive_builder/tests/skip-setter.rs | 2 -- derive_builder_core/src/lib.rs | 4 ---- 19 files changed, 7 insertions(+), 44 deletions(-) diff --git a/derive_builder/Cargo.toml b/derive_builder/Cargo.toml index 858b6a4d..f8221261 100644 --- a/derive_builder/Cargo.toml +++ b/derive_builder/Cargo.toml @@ -28,7 +28,6 @@ alloc = ["derive_builder_macro/alloc"] derive_builder_macro = { version = "=0.20.1", path = "../derive_builder_macro" } [dev-dependencies] -pretty_assertions = "0.6.1" rustversion = "1.0.4" serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/derive_builder/tests/builder_field_custom.rs b/derive_builder/tests/builder_field_custom.rs index 5cd4f427..3195e824 100644 --- a/derive_builder/tests/builder_field_custom.rs +++ b/derive_builder/tests/builder_field_custom.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; use std::num::ParseIntError; diff --git a/derive_builder/tests/builder_name.rs b/derive_builder/tests/builder_name.rs index 3b2cd570..d3e2a24e 100644 --- a/derive_builder/tests/builder_name.rs +++ b/derive_builder/tests/builder_name.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/compile-fail/rename_setter_struct_level.rs b/derive_builder/tests/compile-fail/rename_setter_struct_level.rs index 7565efe6..dec2137f 100644 --- a/derive_builder/tests/compile-fail/rename_setter_struct_level.rs +++ b/derive_builder/tests/compile-fail/rename_setter_struct_level.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] @@ -17,9 +15,11 @@ fn main() { .build() .unwrap(); - assert_eq!(x, - Lorem { - ipsum: "ipsum", - dolor: "dolor", - }); + assert_eq!( + x, + Lorem { + ipsum: "ipsum", + dolor: "dolor", + } + ); } diff --git a/derive_builder/tests/custom_constructor.rs b/derive_builder/tests/custom_constructor.rs index b4daabb0..f55b86b0 100644 --- a/derive_builder/tests/custom_constructor.rs +++ b/derive_builder/tests/custom_constructor.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Eq, Builder)] diff --git a/derive_builder/tests/custom_default.rs b/derive_builder/tests/custom_default.rs index 8fd6d215..1494392c 100644 --- a/derive_builder/tests/custom_default.rs +++ b/derive_builder/tests/custom_default.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; mod field_level { diff --git a/derive_builder/tests/generic_structs.rs b/derive_builder/tests/generic_structs.rs index f5119f55..8887694e 100644 --- a/derive_builder/tests/generic_structs.rs +++ b/derive_builder/tests/generic_structs.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; use std::clone::Clone; diff --git a/derive_builder/tests/generic_with_default.rs b/derive_builder/tests/generic_with_default.rs index 81a5eaa2..3894686d 100644 --- a/derive_builder/tests/generic_with_default.rs +++ b/derive_builder/tests/generic_with_default.rs @@ -1,7 +1,5 @@ #[macro_use] extern crate derive_builder; -#[macro_use] -extern crate pretty_assertions; /// Struct taken from `@shockham/caper` to make sure we emit the correct /// code for struct-level defaults in tandem with generics. diff --git a/derive_builder/tests/lifetime.rs b/derive_builder/tests/lifetime.rs index 13f2a08e..c61d6369 100644 --- a/derive_builder/tests/lifetime.rs +++ b/derive_builder/tests/lifetime.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_custom.rs b/derive_builder/tests/setter_custom.rs index af7df5ed..fa936cae 100644 --- a/derive_builder/tests/setter_custom.rs +++ b/derive_builder/tests/setter_custom.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_extend.rs b/derive_builder/tests/setter_extend.rs index 496c656d..1ce1d8d9 100644 --- a/derive_builder/tests/setter_extend.rs +++ b/derive_builder/tests/setter_extend.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; use std::collections::HashMap; diff --git a/derive_builder/tests/setter_into.rs b/derive_builder/tests/setter_into.rs index b73852d8..e8db1c09 100644 --- a/derive_builder/tests/setter_into.rs +++ b/derive_builder/tests/setter_into.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_name.rs b/derive_builder/tests/setter_name.rs index e1ddade8..8c3d7405 100644 --- a/derive_builder/tests/setter_name.rs +++ b/derive_builder/tests/setter_name.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_pattern.rs b/derive_builder/tests/setter_pattern.rs index b4454891..f6a82f07 100644 --- a/derive_builder/tests/setter_pattern.rs +++ b/derive_builder/tests/setter_pattern.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_prefix.rs b/derive_builder/tests/setter_prefix.rs index 2b423c7c..6fdf59b1 100644 --- a/derive_builder/tests/setter_prefix.rs +++ b/derive_builder/tests/setter_prefix.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_strip_option.rs b/derive_builder/tests/setter_strip_option.rs index d502340c..71de621d 100644 --- a/derive_builder/tests/setter_strip_option.rs +++ b/derive_builder/tests/setter_strip_option.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, PartialEq, Default, Builder, Clone)] diff --git a/derive_builder/tests/setter_visibility.rs b/derive_builder/tests/setter_visibility.rs index 99950934..438273bf 100644 --- a/derive_builder/tests/setter_visibility.rs +++ b/derive_builder/tests/setter_visibility.rs @@ -1,6 +1,4 @@ #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; pub mod foo { diff --git a/derive_builder/tests/skip-setter.rs b/derive_builder/tests/skip-setter.rs index 3b4e75c4..9c1fb539 100644 --- a/derive_builder/tests/skip-setter.rs +++ b/derive_builder/tests/skip-setter.rs @@ -1,7 +1,5 @@ // https://github.com/colin-kiegel/rust-derive-builder/issues/15 #[macro_use] -extern crate pretty_assertions; -#[macro_use] extern crate derive_builder; #[derive(Debug, Clone, PartialEq)] diff --git a/derive_builder_core/src/lib.rs b/derive_builder_core/src/lib.rs index da5737d0..57e59892 100644 --- a/derive_builder_core/src/lib.rs +++ b/derive_builder_core/src/lib.rs @@ -27,10 +27,6 @@ extern crate proc_macro2; extern crate syn; #[macro_use] extern crate quote; -#[cfg(test)] -#[macro_use] -extern crate pretty_assertions; - mod block; mod build_method; mod builder;