]> git.lizzy.rs Git - enumset.git/commitdiff
Fix travis tests.
authorLymia Aluysia <lymia@lymiahugs.com>
Wed, 1 Apr 2020 18:20:50 +0000 (11:20 -0700)
committerLymia Aluysia <lymia@lymiahugs.com>
Wed, 1 Apr 2020 18:20:50 +0000 (11:20 -0700)
.travis.yml
RELEASES.md
enumset/Cargo.toml
enumset/tests/trybuild.rs

index 8480a707c6f2a6ac826f36b7b8bfc7920730afad..0e4c84d835eb39d62c2b053fa13e5cee17eb7492 100644 (file)
@@ -4,7 +4,8 @@ matrix:
   include:
     - rust: stable
     - rust: beta
-    - rust: 1.31.0
+    - rust: 1.31.0 # minimum version supported by enumset
+    - rust: 1.36.0 # minimum version trybuild supports
 
     - rust: nightly
       script:
index 992504d6bc649f14061c94f49c312ee574c7ed1b..145492326d49b2adc4c1d1eb16c43bd96943e79a 100644 (file)
@@ -1,3 +1,13 @@
+# Version 1.0.0 (2020-04-01) - Unreleased
+* **[WARNING: Potential silent breaking change]** Changed `EnumSet::insert` to
+  return whether a value was newly  inserted, rather than whether the value
+  already existed in the set. This corresponds better with the behavior of
+  `HashSet::insert` and `BTreeSet::insert`.
+* Renamed `to_bits`/`from_bits` to `to_u128`/`from_u128` and added additional
+  methods for other built-in numeric types. 
+* `EnumSet::bit_width` and `EnumSet::variant_count` now return a `u32` instead
+  of a `u8` for future-proofing.
+
 # Version 0.4.5 (2020-02-19)
 * Fixed a bug where compilation failed when the `serde` flag was enabled, and
   another trait that defined `serialize` or `deserialize` was in scope.
index ee346aded16f47561a11aa05f0e618511dc059d5..abaedcf5f94a654b34eb53a515706a0aef162df8 100644 (file)
@@ -28,3 +28,5 @@ bincode = { version = "1.0", features = ["i128"] }
 serde_derive = "1.0.91"
 serde_json = "1.0.39"
 trybuild = "1.0.24"
+version_check = "0.9.1"
+
index f4c1557959e595c80e4f0e1a0f727bca28e3fefe..dac1e5188efa3ee346507254f79e2a1fa106f30c 100644 (file)
@@ -1,5 +1,7 @@
 #[test]
 fn ui() {
-    let t = trybuild::TestCases::new();
-    t.compile_fail("tests/compile-fail/*.rs");
+    if version_check::is_min_version("1.36.0") {
+        let t = trybuild::TestCases::new();
+        t.compile_fail("tests/compile-fail/*.rs");
+    }
 }