commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
37d3468b701e86dbf6f4a36482db5784cf7a5d09 | Lymia Aluysia | 2018-11-07T17:56:17 | Define a public API for EnumSetType. | diff --git a/src/lib.rs b/src/lib.rs
index 74ccd01..d8cb7f2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -105,20 +105,59 @@ use core::ops::*;
use num_traits::*;
-#[doc(hidden)]
-/// The trait used to define enum types.
-/// This is **NOT** public API and may change at any time.
+mod private {
+ use super::*;
+ ... | 1 | 50 | 11 |
d1311d4508ac7959088d9a064dd99b3cfd79db71 | Lymia Aluysia | 2018-11-07T17:05:02 | Remove unnessecary bound on EnumSetType::Repr | diff --git a/src/lib.rs b/src/lib.rs
index 048767d..74ccd01 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -109,7 +109,7 @@ use num_traits::*;
/// The trait used to define enum types.
/// This is **NOT** public API and may change at any time.
pub unsafe trait EnumSetType: Copy {
- type Repr: PrimInt + ToPrimitive + ... | 1 | 1 | 1 |
7682420b1141b6666b13c41c8736afd695e5d0ed | Lymia Aluysia | 2018-11-07T16:20:44 | Remove unnessecary bounds on EnumSetType. | diff --git a/src/lib.rs b/src/lib.rs
index e0fbf9c..048767d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -94,13 +94,13 @@
//! assert_eq!(set, Enum::A | Enum::E | Enum::G);
//! ```
-#[cfg(test)]
-extern crate core;
+#[cfg(test)] extern crate core;
extern crate num_traits;
+use core::cmp::Ordering;
use core::fmt;
... | 1 | 32 | 6 |
2a59dfdaedb0fd79374eecf2fe064dd537edfa97 | Lymia Aluysia | 2018-11-07T14:01:47 | Remove final feature flag now that macro_vis_matcher is stable. | diff --git a/Cargo.toml b/Cargo.toml
index 0ea5eb8..823d3e4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ readme = "README.md"
license = "MIT/Apache-2.0"
[features]
-nightly = []
+nightly = [] # Not currently used, but retained for compatibility
[dependencies.num-traits]
version = "0.2"
diff --git ... | 2 | 1 | 55 |
9af33e916c6015c43782d5da44d4129792ac1d91 | Lymia Aluysia | 2018-09-17T14:08:20 | Bump version to 0.3.12 | diff --git a/Cargo.toml b/Cargo.toml
index f78ac64..0ea5eb8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.11"
+version = "0.3.12"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums."
@@ -18,4 +18,4 @@ ... | 1 | 2 | 2 |
291b01c6b9b82c78b9abd8ec09956f468e6cb3ab | Lymia Aluysia | 2018-09-17T14:07:19 | Fix trait resolution issue introduced with num-traits 0.2.6
Fixes #3 | diff --git a/src/lib.rs b/src/lib.rs
index ab977a3..e536e0e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -136,7 +136,7 @@ pub struct EnumSet<T : EnumSetType> {
}
impl <T : EnumSetType> EnumSet<T> {
fn mask(bit: u8) -> T::Repr {
- T::Repr::one() << bit as usize
+ Shl::<usize>::shl(T::Repr::one(), bit... | 1 | 1 | 1 |
f25a1e5def0c401fb3110d19ae9a3ea9a177de8b | Lymia Aluysia | 2018-06-29T08:45:24 | Add a few additional tests. | diff --git a/src/lib.rs b/src/lib.rs
index 589fc44..ab977a3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -782,6 +782,16 @@ mod test {
assert!(set.is_empty());
}
+ #[test]
+ fn empty_is_empty() {
+ assert_eq!(EnumSet::<$e>::empty().l... | 1 | 10 | 0 |
eeb6a864cccab0e5fc7b5bb87e8b6d98c129e744 | Lymia Aluysia | 2018-06-29T08:39:51 | Bump version to 0.3.11 | diff --git a/Cargo.toml b/Cargo.toml
index 0aa4db4..f78ac64 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.10"
+version = "0.3.11"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
57dfe5216f116eddfce2930f3665c42ff925f7be | Lymia Aluysia | 2018-06-29T08:37:44 | Use num_traits for our numerics code. | diff --git a/Cargo.toml b/Cargo.toml
index d1771ad..0aa4db4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,3 +15,7 @@ license = "MIT/Apache-2.0"
[features]
nightly = []
+
+[dependencies.num-traits]
+version = "0.2"
+default-features = false
\ No newline at end of file
diff --git a/src/lib.rs b/src/lib.rs
index 19d... | 2 | 69 | 68 |
08371725fbdbab01ad57641d0858e74b461d5e28 | John Heitmann | 2018-06-24T20:10:18 | Fixes power of 2 sized enums.
Fixes all() and complement() for enums whose variant counts matched the underlying storage size. | diff --git a/src/lib.rs b/src/lib.rs
index 9530522..19d91a0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -142,7 +142,10 @@ impl <T : EnumSetType> EnumSet<T> {
self.__enumset_underlying & mask == mask
}
fn all_bits() -> T::Repr {
- (T::ONE << T::VARIANT_COUNT) - T::ONE
+ match T::VARIANT_... | 1 | 23 | 4 |
c606e16ddd7b83326d0e7a3e77566937040e8ab6 | Lymia Aluysia | 2018-05-25T14:57:05 | Bump version to 0.3.10 | diff --git a/Cargo.toml b/Cargo.toml
index b39bdee..d1771ad 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.9"
+version = "0.3.10"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
3552627b7a6d877f8a4ab33c62ae3bcf85492a35 | Lymia Aluysia | 2018-05-25T14:56:39 | Allow enum_set! for empty sets to be used in const contexts. | diff --git a/src/lib.rs b/src/lib.rs
index 506b16a..9530522 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -650,7 +650,9 @@ macro_rules! enum_set_type {
/// ```
#[macro_export]
macro_rules! enum_set {
- () => { EnumSet::new() };
+ () => {
+ $crate::EnumSet { __enumset_underlying: 0 }
+ };
($($value... | 1 | 4 | 2 |
adc2f09521772a92c28e229e42f60bd6568da50d | Lymia Aluysia | 2018-05-25T14:50:45 | Bump version to 0.3.9 | diff --git a/Cargo.toml b/Cargo.toml
index 47a5bfa..b39bdee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.8"
+version = "0.3.9"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
427def77321b5b3630e6f15de869862d8eefb3f8 | Lymia Aluysia | 2018-05-25T14:50:22 | Add *Assign operators. | diff --git a/src/lib.rs b/src/lib.rs
index 9e82f7c..506b16a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -271,6 +271,7 @@ impl <T : EnumSetType> IntoIterator for EnumSet<T> {
self.iter()
}
}
+
impl <T : EnumSetType, O: Into<EnumSet<T>>> Sub<O> for EnumSet<T> {
type Output = Self;
fn sub(self, o... | 1 | 23 | 0 |
11f336155bb97523a7ea7bc88b761af49c2d34f8 | Lymia Aluysia | 2018-05-25T14:41:12 | Fix minor efficiency issue. | diff --git a/src/lib.rs b/src/lib.rs
index 6d79c7e..9e82f7c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -220,7 +220,7 @@ impl <T : EnumSetType> EnumSet<T> {
}
/// Returns a set with all elements of the other set removed.
pub fn difference(&self, other: Self) -> Self {
- *self & !other
+ Enu... | 1 | 1 | 1 |
fe10bc4fe1a0b2cca0953363d67a8d01fea60bb2 | Lymia Aluysia | 2018-05-25T14:19:34 | Bump version to 0.3.8 | diff --git a/Cargo.toml b/Cargo.toml
index 61efd0b..47a5bfa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.7"
+version = "0.3.8"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
12020c4e66eb4dd489930064181c9579f0e039f1 | Lymia Aluysia | 2018-05-25T14:19:07 | Fix issue with enum_set_type! macro. | diff --git a/src/lib.rs b/src/lib.rs
index b38b554..6d79c7e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -457,31 +457,31 @@ macro_rules! enum_set_type_internal {
impl <O : Into<$crate::EnumSet<$enum_name>>> ::std::ops::Sub<O> for $enum_name {
type Output = $crate::EnumSet<$enum_name>;
... | 1 | 26 | 23 |
d3f5d219eb9c92650ee9a093f1a1d4bd72da2f32 | Lymia Aluysia | 2018-05-25T14:15:31 | Bump version to 0.3.7 | diff --git a/Cargo.toml b/Cargo.toml
index 1ef5247..61efd0b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.6"
+version = "0.3.7"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
61fca7de80fa7a86211acec3785bdf5322f4a6d9 | Lymia Aluysia | 2018-05-25T14:15:06 | Fill out bitwise operator set. | diff --git a/src/lib.rs b/src/lib.rs
index a4fa783..b38b554 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,5 @@
#![cfg_attr(not(test), no_std)]
-#![cfg_attr(all(feature = "nightly"), feature(const_fn, allow_internal_unstable, macro_vis_matcher))]
+#![cfg_attr(all(feature = "nightly"), feature(allow_internal_unsta... | 1 | 147 | 53 |
eca6ddea6414e2ba40a0d8221472cae7498988ec | Lymia Aluysia | 2018-05-24T16:17:46 | Bump vesion to 0.3.6 | diff --git a/Cargo.toml b/Cargo.toml
index c16bdf3..1ef5247 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.5"
+version = "0.3.6"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
e2d91f12f32a47341318edbdaa8bd8bc88c7ecbd | Lymia Aluysia | 2018-05-24T03:45:48 | Bump version to 0.3.5 | diff --git a/Cargo.toml b/Cargo.toml
index d76cb4e..2ea803c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.4"
+version = "0.3.5"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
7d05e6b687a946e292066350acb342459eb50235 | Lymia Aluysia | 2018-05-24T03:44:21 | Test to_bits/from_bits, add checks for range in from_bits. | diff --git a/src/lib.rs b/src/lib.rs
index 730b57f..a4fa783 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -148,8 +148,14 @@ impl <T : EnumSetType> EnumSet<T> {
pub fn to_bits(&self) -> u128 {
T::repr_to_u128(self.__enumset_underlying)
}
- /// Constructs a bitset from raw bits
+
+ /// Constructs a... | 1 | 19 | 1 |
eac5b4847d4b8327e167751133baae910c3a8861 | Lymia Aluysia | 2018-05-24T03:16:08 | Remove depenency of the enum_set!(A | B | C) form on nightly features through black magic. | diff --git a/src/lib.rs b/src/lib.rs
index 7650eea..730b57f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -50,7 +50,7 @@
//! # enum Enum { A, B, C }
//! # }
//! # fn main() {
-//! const CONST_SET: EnumSet<Enum> = enum_set!(Enum, Enum::A | Enum::B);
+//! const CONST_SET: EnumSet<Enum> = enum_set!(Enum::A | Enum::B)... | 1 | 27 | 70 |
0406c6bed37502b94bcef288a3efd23381637ca1 | Lymia Aluysia | 2018-05-24T02:58:43 | Add #[no_std], because why not. | diff --git a/src/lib.rs b/src/lib.rs
index bc47506..7650eea 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,4 @@
+#![cfg_attr(not(test), no_std)]
#![cfg_attr(all(feature = "nightly"), feature(const_fn, allow_internal_unstable, macro_vis_matcher))]
#![forbid(missing_docs)]
@@ -79,10 +80,13 @@
//! [`enum_set!`]:... | 1 | 8 | 4 |
557fef1be991b796d0f85e9bb1f42b643e6e7fb2 | Lymia Aluysia | 2018-05-24T02:30:54 | Expanded API. | diff --git a/src/lib.rs b/src/lib.rs
index 83d8a91..7d41ff0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -99,6 +99,9 @@ pub trait EnumSetType : Copy {
fn count_ones(val: Self::Repr) -> usize;
fn into_u8(self) -> u8;
fn from_u8(val: u8) -> Self;
+
+ fn repr_to_u128(bits: Self::Repr) -> u128;
+ fn rep... | 1 | 25 | 0 |
3f2bbf8166ed2abca2937f78d1b30a4efe2394e5 | Lymia Aluysia | 2018-05-24T02:22:12 | compile_error! was long stable. | diff --git a/src/lib.rs b/src/lib.rs
index 661fcb5..83d8a91 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -298,7 +298,7 @@ macro_rules! enum_set_type_internal_count_variants {
$_f0:ident $_f1:ident $_f2:ident $_f3:ident $_f4:ident $_f5:ident $_f6:ident $_f7:ident
$($rest:ident)+
) => {
- ENU... | 1 | 1 | 1 |
33659a45ee9a6499028d24fb987deee6952dbb02 | Lymia Aluysia | 2018-05-24T02:20:16 | u128 is stable. | diff --git a/src/lib.rs b/src/lib.rs
index a07ca2c..661fcb5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,3 @@
-#![cfg_attr(all(test, feature = "nightly"), feature(i128, i128_type))]
#![cfg_attr(all(feature = "nightly"), feature(const_fn, allow_internal_unstable, macro_vis_matcher))]
#![forbid(missing_docs)]
... | 1 | 0 | 46 |
d642011d4c1e25c9cdc7c3168f45e2b6d349a1e1 | Lymia Aluysia | 2017-12-09T23:15:37 | Support vis macro matchers on nightly. | diff --git a/Cargo.toml b/Cargo.toml
index f51da3e..d743550 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.2"
+version = "0.3.3"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums."
diff --git a/src/lib... | 2 | 41 | 2 |
5650698de77f1b27d169fc60d7b9bdcec78799df | Lymia Aluysia | 2017-11-29T18:37:16 | Fix errornous cfg attributes in generated enums | diff --git a/Cargo.toml b/Cargo.toml
index 912192c..f51da3e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.1"
+version = "0.3.2"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums."
diff --git a/src/lib... | 2 | 1 | 6 |
873a2cb35019cde026b0a4b66d1f0055b944ad9e | Lymia Aluysia | 2017-11-29T18:33:30 | Fix nightly macros. | diff --git a/Cargo.toml b/Cargo.toml
index 63d1c83..912192c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.3.0"
+version = "0.3.1"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums."
diff --git a/src/lib... | 2 | 2 | 2 |
63e2cbbc51c9fd2ff989b5aad9c410bcd5cc411c | Lymia Aluysia | 2017-11-29T18:25:51 | Bump version to 0.3.0 | diff --git a/Cargo.toml b/Cargo.toml
index 41ee9d7..63d1c83 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.2.1"
+version = "0.3.0"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
662252cae2b23785733605b0fc96e0731bbbd5bd | Lymia Aluysia | 2017-11-29T18:25:40 | Forbid missing docs. | diff --git a/src/lib.rs b/src/lib.rs
index 842573f..94e4d66 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,6 @@
#![cfg_attr(all(test, feature = "nightly"), feature(i128, i128_type))]
#![cfg_attr(all(feature = "nightly"), feature(const_fn, allow_internal_unstable))]
+#![forbid(missing_docs)]
//! A library for ... | 1 | 2 | 0 |
900332c9cc56259411102bc739c193f54eb9eb9a | Lymia Aluysia | 2017-11-29T18:24:46 | Add support for enum_map! without an explicit type | diff --git a/src/lib.rs b/src/lib.rs
index 4cf0b7d..842573f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,5 @@
#![cfg_attr(all(test, feature = "nightly"), feature(i128, i128_type))]
-#![cfg_attr(all(feature = "nightly"), feature(const_fn))]
+#![cfg_attr(all(feature = "nightly"), feature(const_fn, allow_internal_... | 1 | 105 | 26 |
31ab15d318a6c7cac12d20e95f81770b074a09fe | Lymia Aluysia | 2017-10-29T14:25:10 | Revert "Don't derive as many traits automatically. Only implement the minimum for EnumSet to work."
This reverts commit 8dbac85b57eb004f3cf92bd5dead361e9cc709d3. | diff --git a/src/lib.rs b/src/lib.rs
index c3b0c13..4adab29 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,7 +14,6 @@
//! # use enumset::*;
//! enum_set_type! {
//! /// Documentation for the enum
-//! #[derive(Debug)]
//! pub enum Enum {
//! A, B, C, D, E, F, G,
//! #[doc(hidden)] __N... | 1 | 8 | 43 |
002c1a71fadcb135ca9e7bc106f80715e7ac7c49 | Lymia Aluysia | 2017-10-29T14:25:07 | Revert "Bump version to 0.2.0."
This reverts commit 633ee0aa3ef8315e641bbf4297be0ce9b71b34d4. | diff --git a/Cargo.toml b/Cargo.toml
index ba6389d..77c4fc4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.2.0"
+version = "0.1.2"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
633ee0aa3ef8315e641bbf4297be0ce9b71b34d4 | Lymia Aluysia | 2017-10-29T14:23:09 | Bump version to 0.2.0. | diff --git a/Cargo.toml b/Cargo.toml
index 77c4fc4..ba6389d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.1.2"
+version = "0.2.0"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
8dbac85b57eb004f3cf92bd5dead361e9cc709d3 | Lymia Aluysia | 2017-10-29T14:22:26 | Don't derive as many traits automatically. Only implement the minimum for EnumSet to work. | diff --git a/src/lib.rs b/src/lib.rs
index 4adab29..c3b0c13 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,6 +14,7 @@
//! # use enumset::*;
//! enum_set_type! {
//! /// Documentation for the enum
+//! #[derive(Debug)]
//! pub enum Enum {
//! A, B, C, D, E, F, G,
//! #[doc(hidden)] __N... | 1 | 43 | 8 |
097a1af9cfc27c049076e3cffda0e20ffce87853 | Lymia Aluysia | 2017-10-29T13:05:36 | Bump version to 0.1.2 | diff --git a/Cargo.toml b/Cargo.toml
index 55d731f..77c4fc4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
65b61713e07298f1aaf40c1be370282832b9acb5 | Lymia Aluysia | 2017-10-29T13:03:30 | Allow empty enum_set! entries (for use with macros). | diff --git a/src/lib.rs b/src/lib.rs
index 2577291..4adab29 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -482,7 +482,7 @@ macro_rules! enum_set_type {
/// ```
#[macro_export]
macro_rules! enum_set {
- ($enum_name:ty, $($value:path)|+ $(|)*) => {
+ ($enum_name:ty, $($value:path)|* $(|)*) => {
$crate::En... | 1 | 3 | 1 |
d0185c7783d78438fad2a2b112e24d29587a6e2b | Lymia Aluysia | 2017-10-29T12:25:41 | Bump version to 0.1.1 | diff --git a/Cargo.toml b/Cargo.toml
index 67fb06f..55d731f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "enumset"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Lymia Aluysia <lymia@lymiahugs.com>"]
description = "A library for creating compact sets of enums." | 1 | 1 | 1 |
000ee9b53e8e2ff337f80e19fefd37ee9b3b50e1 | Lymia Aluysia | 2017-10-29T12:25:05 | Allow trailing pipes in enum_set!. | diff --git a/src/lib.rs b/src/lib.rs
index 101406f..2577291 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -482,7 +482,7 @@ macro_rules! enum_set_type {
/// ```
#[macro_export]
macro_rules! enum_set {
- ($enum_name:ty, $($value:path)|+) => {
+ ($enum_name:ty, $($value:path)|+ $(|)*) => {
$crate::EnumSet:... | 1 | 1 | 1 |
249c80c488da910c5ec5b7618b99ed505c6adcf2 | Lymia Aluysia | 2017-10-29T10:21:59 | Improve documentation. | diff --git a/src/lib.rs b/src/lib.rs
index e313b0f..101406f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -244,7 +244,7 @@ impl <T : EnumSetType + Debug> Debug for EnumSet<T> {
}
}
-/// An iterator for enums created with the [`enum_set_type!`](./macro.enum_set_type.html) macro.
+/// The iterator used by [`EnumSet... | 1 | 5 | 3 |
0a9553658f46379f5e2b9900df118d2c0b6a38ab | Lymia Aluysia | 2017-10-29T10:16:13 | Add links to documentation, and proofread. | diff --git a/src/lib.rs b/src/lib.rs
index 36a08f1..e313b0f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -7,7 +7,7 @@
//!
//! # Defining enums for use with EnumSet
//!
-//! Enums to be used with `EnumSet` should be defined through the `enum_set_type!` macro:
+//! Enums to be used with [`EnumSet`] should be defined th... | 1 | 13 | 7 |
6b193047bf2c5626da5dc5f3a23b58ab9bd3f130 | Luca Palmieri | 2025-08-24T11:50:03 | chore: Release wiremock version 0.6.5 | diff --git a/Cargo.lock b/Cargo.lock
index 3ecc7ff..c6bee63 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1991,7 +1991,7 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
[[package]]
name = "wiremock"
-version = "0.6.4"
+version = "0.6.5"
dependencies = [
"actix-rt",
"assert-json-... | 2 | 2 | 2 |
ebaa70b024eb05a46b2192d801e4281ad663488f | Bartlomiej Dudzik | 2025-08-24T11:48:04 | feat: Make method and MethodExactMatcher case in-sensitive (#165) | diff --git a/src/matchers.rs b/src/matchers.rs
index fda58a8..b9650dc 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -16,7 +16,7 @@ use regex::Regex;
use serde::Serialize;
use serde_json::Value;
use std::convert::TryInto;
-use std::str;
+use std::str::{self, FromStr};
use url::Url;
/// Implement the `Matc... | 2 | 45 | 7 |
613b4f91353133bfced5ed973f04b8dd020ef032 | Daniel Cormier | 2025-08-24T11:47:01 | Make `BodyPrintLimit` public (#167) | diff --git a/src/lib.rs b/src/lib.rs
index 62fad5e..c0b2efd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -159,6 +159,6 @@ pub type ErrorResponse = Box<dyn std::error::Error + Send + Sync + 'static>;
pub use mock::{Match, Mock, MockBuilder, Times};
pub use mock_server::{MockGuard, MockServer, MockServerBuilder};
-pub... | 1 | 1 | 1 |
abfafd2227cb00c42b7b057faed6d2d96c42f9b8 | Luca Palmieri | 2025-08-24T11:46:26 | chore: Upgrade all deps to their latest version (#170) | diff --git a/Cargo.lock b/Cargo.lock
index 54979bf..3ecc7ff 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -182,17 +182,6 @@ version = "4.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
-[[package]]
-name = "async-trait... | 3 | 13 | 29 |
47d83c615339db466f7736263c5f5081e7de3950 | Luca Palmieri | 2025-06-19T09:48:18 | Update lockfile | diff --git a/Cargo.lock b/Cargo.lock
index 946e8dc..8f76a14 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,19 +4,19 @@ version = 4
[[package]]
name = "actix-macros"
-version = "0.2.0"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbcb2b608f0accc2f5bcf3dd872194ce13... | 1 | 182 | 274 |
29c5ac8e6cc75ab88f94255df0a0cf881f560a62 | Luca Palmieri | 2025-06-19T09:48:05 | chore: Release wiremock version 0.6.4 | diff --git a/Cargo.lock b/Cargo.lock
index eec4741..946e8dc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2016,7 +2016,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "wiremock"
-version = "0.6.3"
+version = "0.6.4"
dependencies = [
"actix-rt",
"assert-json-... | 2 | 2 | 2 |
ba2e0c75964eeebeccee752ea2c35ab659c02786 | konsti | 2025-06-19T09:47:36 | Allow returning arbitrary errors (#159)
* Allow returning arbitrary errors
Add `MockBuilder::respond_with_err` to respond with an arbitrary Rust error instead of an HTTP error.
Due to overlapping impl constraints, `RespondErr` only supports passing a function that returns an error and not the error itself.
Fixes #1... | diff --git a/src/lib.rs b/src/lib.rs
index c99b1e1..62fad5e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -155,6 +155,8 @@ mod respond;
mod response_template;
mod verification;
+pub type ErrorResponse = Box<dyn std::error::Error + Send + Sync + 'static>;
+
pub use mock::{Match, Mock, MockBuilder, Times};
pub use mo... | 8 | 146 | 26 |
428142c5d75b12e685808bac23afa0ed38bee9e0 | Luca Palmieri | 2025-03-01T17:30:12 | chore: Release wiremock version 0.6.3 | diff --git a/Cargo.toml b/Cargo.toml
index 57b23b6..5caa2d9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.6.2"
+version = "0.6.3"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
155e8d4b2d90f9b338ee20c34cb91f4d7c2d59a0 | xd009642 | 2025-03-01T17:29:44 | Implement From<RangeFull> for Times (#155)
I just noticed this is a bit of an odd one out in the implementation. I
believe RangeFull is the default so a user doesn't have to set it
explicitly. But if they did just out of idle habit then there wasn't a
From conversion.
Not really a big thing but I just figured it woul... | diff --git a/src/mock.rs b/src/mock.rs
index 306ad42..a71a2ab 100644
--- a/src/mock.rs
+++ b/src/mock.rs
@@ -765,6 +765,12 @@ impl From<u64> for Times {
}
}
+impl From<RangeFull> for Times {
+ fn from(x: RangeFull) -> Self {
+ Times(TimesEnum::Unbounded(x))
+ }
+}
+
// A quick macro to help easing... | 1 | 6 | 0 |
b62b0d6547bf92d3b6819922957ddbf66be2535b | Luca Palmieri | 2024-09-07T09:24:29 | chore: Release wiremock version 0.6.2 | diff --git a/Cargo.toml b/Cargo.toml
index c4789b5..57b23b6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.6.1"
+version = "0.6.2"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
313583a3012598a06a67766e6172e12c98e14a1d | John Vandenberg | 2024-09-07T09:23:53 | Update dependencies (#147) | diff --git a/Cargo.toml b/Cargo.toml
index 66262d6..c4789b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -33,12 +33,12 @@ deadpool = "0.10.0"
async-trait = "0.1"
once_cell = "1"
assert-json-diff = "2.0.1"
-base64 = "0.21.0"
+base64 = "0.22"
url = "2.2"
[dev-dependencies]
-async-std = { version = "1.9.0", features... | 1 | 3 | 3 |
edd9550b06f0e475332e5380001df67f14e000eb | Luca Palmieri | 2024-07-22T07:44:19 | chore: Release wiremock version 0.6.1 | diff --git a/Cargo.toml b/Cargo.toml
index 87b0bc8..66262d6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.6.0"
+version = "0.6.1"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
e5e5402222303d821f5300739290d26468e54408 | Yury Yarashevich | 2024-07-03T08:13:54 | Allow h2 requests being mocked. (#145)
* Allow h2 requests being mocked.
* Test http2 requests accepted. | diff --git a/Cargo.toml b/Cargo.toml
index 494b189..87b0bc8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ futures = "0.3.5"
http = "1.0"
http-body-util = "0.1"
hyper = { version = "1.0", features = ["full"] }
-hyper-util = { version = "0.1", features = ["tokio"] }
+hyper-util = { version = "0.1", featur... | 3 | 27 | 4 |
c4a98f8d2c223b33ad33da89a203986dd5d1bb6d | Alex van de Sandt | 2024-06-28T08:46:48 | Add `ResponseTemplate::append_headers` method (#146)
* Add `ResponseTemplate::append_headers`
* Add doc test for `append_headers` | diff --git a/src/response_template.rs b/src/response_template.rs
index a8c5ce7..fab29c6 100644
--- a/src/response_template.rs
+++ b/src/response_template.rs
@@ -114,6 +114,59 @@ impl ResponseTemplate {
self
}
+ /// Append multiple header key-value pairs.
+ ///
+ /// Existing header values will ... | 1 | 53 | 0 |
c1710b4ac51603f126fbeb25a5a180318c86a6f1 | Luca Palmieri | 2024-02-11T15:58:27 | cargo fmt | diff --git a/src/mock_server/pool.rs b/src/mock_server/pool.rs
index a0adbd8..6cea1b6 100644
--- a/src/mock_server/pool.rs
+++ b/src/mock_server/pool.rs
@@ -65,7 +65,7 @@ impl deadpool::managed::Manager for MockServerPoolManager {
async fn recycle(
&self,
mock_server: &mut BareMockServer,
- ... | 1 | 1 | 1 |
9a8eafa64e7b2d22e3585af07fae4795ee225058 | Luca Palmieri | 2024-02-11T15:52:12 | chore: Release wiremock version 0.6.0 | diff --git a/Cargo.toml b/Cargo.toml
index cc9c019..494b189 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.6.0-rc.3"
+version = "0.6.0"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
9ad09859d538169af93c85484df07c2e057c9421 | Luca Palmieri | 2024-02-11T15:51:25 | Update deadpool. | diff --git a/Cargo.toml b/Cargo.toml
index bd7bc8c..cc9c019 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ http-body-util = "0.1"
hyper = { version = "1.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["tokio"] }
tokio = { version = "1.5.0", features = ["rt", "macros"] }
-deadpool = ... | 2 | 3 | 2 |
3857e6c15dcaea4320cfc5cacc23481f2c984e1e | Luca Palmieri | 2024-02-11T15:48:52 | Tweak docs. | diff --git a/src/matchers.rs b/src/matchers.rs
index 9b64c62..e35e3f8 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -871,7 +871,7 @@ impl Match for QueryParamExactMatcher {
}
#[derive(Debug)]
-/// Match a part of a query parameter value.
+/// Match when a query parameter contains the specified value as a su... | 1 | 3 | 2 |
8a6ce5c975c01dc5e6fc2b9f3a633f4e1ffd6f53 | Taj Pereira | 2024-02-11T15:46:12 | feat: add query_param_contains (#139) | diff --git a/src/matchers.rs b/src/matchers.rs
index 00bbfbe..9b64c62 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -870,6 +870,63 @@ impl Match for QueryParamExactMatcher {
}
}
+#[derive(Debug)]
+/// Match a part of a query parameter value.
+///
+/// ### Example:
+/// ```rust
+/// use wiremock::{MockSe... | 1 | 57 | 0 |
cf90ea3cff618867920f18e72a63a469ca86350b | Luca Palmieri | 2024-01-18T09:39:28 | chore: Release wiremock version 0.6.0-rc.3 | diff --git a/Cargo.toml b/Cargo.toml
index 64df524..bd7bc8c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.6.0-rc.2"
+version = "0.6.0-rc.3"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
df95b99195e6c7f346810fb48d823f1a1f6c31aa | LukeMathWalker | 2024-01-18T09:38:28 | Do not expose BodyPrintLimit as a Request field | diff --git a/src/mock_server/bare_server.rs b/src/mock_server/bare_server.rs
index 7ed6cbb..70b6db4 100644
--- a/src/mock_server/bare_server.rs
+++ b/src/mock_server/bare_server.rs
@@ -38,9 +38,8 @@ pub(super) struct MockServerState {
impl MockServerState {
pub(super) async fn handle_request(
&mut self,
... | 4 | 70 | 53 |
e7e68f0a567b40d12c6059a6932a826f8e902c9e | Nick Schober | 2024-01-17T17:15:17 | Update unregistered_mock example to mock a POST (#138) | diff --git a/src/mock.rs b/src/mock.rs
index 7a188aa..306ad42 100644
--- a/src/mock.rs
+++ b/src/mock.rs
@@ -160,7 +160,7 @@ impl Debug for Matcher {
/// mock_server.register(mock).await;
///
/// // We won't register this mock instead.
-/// let unregistered_mock = Mock::given(method("GET")).respond_with(... | 1 | 1 | 1 |
147c4c013c919d9db0bd1dc5cbf894abf875b37a | Luca Palmieri | 2024-01-17T13:13:21 | chore: Release wiremock version 0.6.0-rc.2 | diff --git a/Cargo.toml b/Cargo.toml
index de87178..64df524 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.6.0-rc.1"
+version = "0.6.0-rc.2"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
6948eee393a23817251de0b15115850b6796a82d | Luca Palmieri | 2024-01-17T13:13:06 | Add macros feature to Tokio, since we use select | diff --git a/Cargo.toml b/Cargo.toml
index b6f1a40..de87178 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,7 +28,7 @@ http = "1.0"
http-body-util = "0.1"
hyper = { version = "1.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["tokio"] }
-tokio = { version = "1.5.0", features = ["rt"] }
+tokio =... | 1 | 1 | 1 |
ea63d22049864d2d1bdbb9f512287673692fff62 | Luca Palmieri | 2024-01-17T13:04:44 | chore: Release wiremock version 0.6.0-rc.1 | diff --git a/Cargo.toml b/Cargo.toml
index 7a3e53e..b6f1a40 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.22"
+version = "0.6.0-rc.1"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
36d88356c7fc03f0517872c450d99a3380ffbe13 | John Vandenberg | 2024-01-16T05:52:37 | Fix typo in docs (#137) | diff --git a/src/request.rs b/src/request.rs
index d1f8faa..d853a8c 100644
--- a/src/request.rs
+++ b/src/request.rs
@@ -8,7 +8,7 @@ use url::Url;
pub const BODY_PRINT_LIMIT: usize = 10_000;
/// Specifies limitations on printing request bodies when logging requests. For some mock servers
-/// the bodies may be too ... | 1 | 1 | 1 |
8047af3b0adb8f97de14861f6cd810c0a82e810f | 尹吉峰 | 2023-11-30T08:06:19 | use hyperium/http instead of http-rs/http-types (#128)
* use http instead of http-types
* chore: appease clippy::format_collect
* chore: appease some clippy::pedantic rules
* chore: remove unused `isahc`
* chore: use tokio::time::Sleep instead of futures_timer::Delay
* fix: HeaderExactMatcher is order s... | diff --git a/Cargo.toml b/Cargo.toml
index a69e37a..7a3e53e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,19 +20,21 @@ path = "src/lib.rs"
[dependencies]
log = "0.4"
-http-types = { version = "2.11", default-features = false, features = ["hyperium_http"] }
serde_json = "1"
serde = "1"
regex = "1"
-futures-time... | 13 | 205 | 292 |
d61239eb4b3b77bf363fadab50b7da10ceb5f120 | Luca Palmieri | 2023-11-30T07:40:04 | (cargo-release) version 0.5.22 | diff --git a/Cargo.toml b/Cargo.toml
index 713555a..a69e37a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.21"
+version = "0.5.22"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
5f28aa4833692f3704fb85f8afcb493d450b98ae | Alex van de Sandt | 2023-11-30T07:38:53 | Fix newer clippy and rustdoc lints (#136)
* Use fold/write! to build error messages
Resolves this clippy lint: https://rust-lang.github.io/rust-clippy/master/index.html#/format_collect
* Remove redundant explicit link targets in internal docs
Resolves this rustdoc lint: https://doc.rust-lang.org/rustdoc/lints... | diff --git a/src/mock.rs b/src/mock.rs
index 790109a..9b50edb 100644
--- a/src/mock.rs
+++ b/src/mock.rs
@@ -540,7 +540,7 @@ impl Mock {
/// # Limitations
///
/// When expectations of a scoped [`Mock`] are not verified, it will trigger a panic - just like a normal [`Mock`].
- /// Due to [limitations](... | 4 | 29 | 36 |
11af9785f1cc80b65e0e0ef6f2589e552eec50c8 | Alex van de Sandt | 2023-11-29T16:50:05 | Add `must_use` attribute to `Mock` (#135)
It's easy to forget to mount a mock to a server, even though the docs call this out. This commit tags the `Mock` struct with [`#[must_use]`][reference], so that Rust itself can warn users when they forget to mount their mocks. The help string
Here's the warning emitted:
``... | diff --git a/src/mock.rs b/src/mock.rs
index 05c04e8..790109a 100644
--- a/src/mock.rs
+++ b/src/mock.rs
@@ -253,6 +253,7 @@ impl Debug for Matcher {
/// [`register`]: MockServer::register
/// [`mount`]: Mock::mount
/// [`mount_as_scoped`]: Mock::mount_as_scoped
+#[must_use = "`Mock`s have to be mounted or registere... | 1 | 1 | 0 |
9461acb60b4cd36d554ab4d2d46b8106df78115c | Matthias Bechtold | 2023-11-29T08:11:51 | feat: implement Debug trait for MockServer (#134)
* feat: implement Debug trait for MockServer
* refactor: move Debug impl into BareMockServer
* fix: derive Debug on MockServer | diff --git a/src/mock_server/bare_server.rs b/src/mock_server/bare_server.rs
index c13a82b..f810b7f 100644
--- a/src/mock_server/bare_server.rs
+++ b/src/mock_server/bare_server.rs
@@ -3,6 +3,7 @@ use crate::mock_set::MockId;
use crate::mock_set::MountedMockSet;
use crate::request::BodyPrintLimit;
use crate::{mock::... | 4 | 37 | 0 |
eef4eb5ecc592f3532c79abfa02b0171909bc7a1 | Luca Palmieri | 2023-11-03T13:33:41 | (cargo-release) version 0.5.21 | diff --git a/Cargo.toml b/Cargo.toml
index d8f640d..713555a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.20"
+version = "0.5.21"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
7b2ad504851d1c03b6c3250fb58c55166ba4662a | xd009642 | 2023-11-03T13:32:52 | Fix mistake that slipped through review. (#132)
if the last 4 bytes of the of the truncated body happen to all be valid character boundaries it'll print it 4 times. This adds a break after it's printed to avoid this issue | diff --git a/src/request.rs b/src/request.rs
index 8e078ef..b3508a5 100644
--- a/src/request.rs
+++ b/src/request.rs
@@ -74,6 +74,7 @@ impl fmt::Display for Request {
)?;
writeln!(f, "Increase this limit by setting `WIREMOCK_BODY_PRINT_LIMIT`, or calling `MockSe... | 1 | 1 | 0 |
ae690d0d9a262a1303f3e8d3b8cbfba3977cd335 | Luca Palmieri | 2023-11-03T12:37:37 | (cargo-release) version 0.5.20 | diff --git a/Cargo.toml b/Cargo.toml
index 647a3f0..d8f640d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.19"
+version = "0.5.20"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
b2c5fc2bcd8fd7da308f253a56064cc0a0977e7c | Luca Palmieri | 2023-11-03T12:32:30 | Fix clippy lint | diff --git a/src/mock_set.rs b/src/mock_set.rs
index 3b0c164..996d6f0 100644
--- a/src/mock_set.rs
+++ b/src/mock_set.rs
@@ -94,7 +94,7 @@ impl MountedMockSet {
///
/// It will stop matching against incoming requests, regardless of its specification.
pub(crate) fn deactivate(&mut self, mock_id: MockId) {... | 2 | 2 | 2 |
698cd76da311b0d9c6a30abc5734ced87fe5971d | xd009642 | 2023-11-03T12:30:05 | Don't print non-utf8 bodies (#125)
* Don't print non-utf8 bodies
A lot of our services take in multipart data or binary data in the HTTP
body and when a wiremock predicate fails megabytes of binary data get
printed out to the console. Here I address this by not printing out a
string if it isn't valid utf8 and in... | diff --git a/src/mock_server/bare_server.rs b/src/mock_server/bare_server.rs
index e8877a0..c13a82b 100644
--- a/src/mock_server/bare_server.rs
+++ b/src/mock_server/bare_server.rs
@@ -1,6 +1,7 @@
use crate::mock_server::hyper::run_server;
use crate::mock_set::MockId;
use crate::mock_set::MountedMockSet;
+use crate:... | 3 | 90 | 4 |
4816f5675102811f11b17703e6d48e14268249c2 | Luca Palmieri | 2023-06-07T09:49:13 | (cargo-release) version 0.5.19 | diff --git a/Cargo.toml b/Cargo.toml
index 23217c0..647a3f0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.18"
+version = "0.5.19"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
7f193f1f06ed5af4ea840de456c4e2758741f74f | Luca Palmieri | 2023-06-07T09:49:00 | Add docs to MockGuard's methods | diff --git a/Cargo.toml b/Cargo.toml
index 84ff985..23217c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,6 +38,6 @@ base64 = "0.21.0"
async-std = { version = "1.9.0", features = ["attributes"] }
surf = "2.3.2"
reqwest = "0.11.3"
-tokio = { version = "1.5.0", features = ["macros"] }
+tokio = { version = "1.5.0", f... | 2 | 47 | 1 |
b6e4739915fb295983a2bf38c5f248b5a680b7cb | Conrad Ludgate | 2023-06-07T09:36:53 | async satisfaction (#117)
* async satisfaction
* simplify sync logic and
* increate timeoutto avoid flaky test | diff --git a/Cargo.toml b/Cargo.toml
index 4d3dd44..84ff985 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ regex = "1"
futures-timer = "3.0.2"
futures = "0.3.5"
hyper = { version = "0.14", features = ["full"] }
-tokio = { version = "1.5.0", features = ["rt", "io-util", "time"] }
+tokio = { version = "1.5... | 5 | 128 | 13 |
b282fe8030f3eab11f3f10e5b10cbc37fb466673 | Luca Palmieri | 2023-04-01T19:45:51 | (cargo-release) version 0.5.18 | diff --git a/Cargo.toml b/Cargo.toml
index a9b24b5..4d3dd44 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.17"
+version = "0.5.18"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
f8eb9a59bf8dbaecbb7278e87e7129681835f540 | Luca Palmieri | 2023-04-01T19:41:59 | Make sure to handle multi-valued headers properly. | diff --git a/src/request.rs b/src/request.rs
index b1ad1e6..cb2e163 100644
--- a/src/request.rs
+++ b/src/request.rs
@@ -1,3 +1,4 @@
+use std::iter::FromIterator;
use std::str::FromStr;
use std::{collections::HashMap, fmt};
@@ -88,17 +89,23 @@ impl Request {
.unwrap();
let mut headers = HashMap:... | 2 | 39 | 5 |
58326b9b479084797df934d951e247af32e012a8 | Marco Ieni | 2023-03-19T11:16:34 | chore(docs): remove clone (#112) | diff --git a/src/response_template.rs b/src/response_template.rs
index 87690e5..b914dea 100644
--- a/src/response_template.rs
+++ b/src/response_template.rs
@@ -245,7 +245,7 @@ impl ResponseTemplate {
/// // Arrange
/// let mock_server = MockServer::start().await;
/// let delay = Duration::fr... | 1 | 1 | 1 |
cf5b2be717e5f8f147d0495d2edf16c81c745ebf | TennyZhuang | 2023-01-25T10:01:04 | chore: bump base64 to v0.21 (#110)
* chore: bump base64 to v0.21
* don't use star imports | diff --git a/Cargo.toml b/Cargo.toml
index bf01058..a9b24b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,7 +32,7 @@ deadpool = "0.9.2"
async-trait = "0.1"
once_cell = "1"
assert-json-diff = "2.0.1"
-base64 = "0.13.0"
+base64 = "0.21.0"
[dev-dependencies]
async-std = { version = "1.9.0", features = ["attribute... | 2 | 3 | 2 |
216fda9075547f42a5521ee731bf90988ce9f9ec | Luca Palmieri | 2023-01-12T09:09:00 | (cargo-release) version 0.5.17 | diff --git a/Cargo.toml b/Cargo.toml
index fdcdf83..bf01058 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.16"
+version = "0.5.17"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
53406a428d7d4c232b7796b3034775fb716dcd1b | Marco Ieni | 2023-01-12T09:08:31 | Panic if the path matcher contains a host (#108) | diff --git a/src/matchers.rs b/src/matchers.rs
index 10c7c48..afa40df 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -10,7 +10,7 @@
use crate::{Match, Request};
use assert_json_diff::{assert_json_matches_no_panic, CompareMode};
use http_types::headers::{HeaderName, HeaderValue, HeaderValues};
-use http_types:... | 2 | 31 | 17 |
e6623e3e47e39165a267626c27ff0f284c33399c | Kian-Meng Ang | 2023-01-07T16:37:23 | Fix typos (#107)
Found via `typos --format brief` | diff --git a/src/lib.rs b/src/lib.rs
index c1cbecb..3aa13b8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -120,7 +120,7 @@
//! - Spying (e.g. verify that a mock has/hasn't been called in a test);
//! - Standalone mode (i.e. can I launch an HTTP mock server outside of a test suite?).
//!
-//! | | Test executi... | 3 | 4 | 4 |
dfc7912e2c1f6a186b1d15eb4696575fdaa47c39 | Luca Palmieri | 2022-12-31T08:52:00 | (cargo-release) version 0.5.16 | diff --git a/Cargo.toml b/Cargo.toml
index 049e1ed..fdcdf83 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.15"
+version = "0.5.16"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
8f2a45718722c9da8472197fa45190bb5a481905 | Marco Ieni | 2022-12-31T08:49:45 | Panic if `path` contains `?` (#104)
* Panic if `path` contains `?`
* Update src/matchers.rs
Co-authored-by: Luca Palmieri <20745048+LukeMathWalker@users.noreply.github.com> | diff --git a/src/matchers.rs b/src/matchers.rs
index 09b3973..10c7c48 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -207,6 +207,10 @@ impl PathExactMatcher {
pub fn new<T: Into<String>>(path: T) -> Self {
let path = path.into();
+ if path.contains('?') {
+ panic!("Wiremock can'... | 2 | 11 | 1 |
9a5de123e3a894de9ed7a0a858d5f669c044a659 | Luca Palmieri | 2022-10-10T08:07:40 | (cargo-release) version 0.5.15 | diff --git a/Cargo.toml b/Cargo.toml
index 91c2480..049e1ed 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wiremock"
-version = "0.5.14"
+version = "0.5.15"
authors = ["Luca Palmieri <rust@lpalmieri.com>"]
edition = "2018" | 1 | 1 | 1 |
4c0ebd320febd48bf3abe351b02fdfc05252d3bd | Felipe Seré | 2022-10-10T08:06:57 | Use MockGuards to expose matched requetsts on mocks (#102) | diff --git a/src/mock_server/bare_server.rs b/src/mock_server/bare_server.rs
index 235f43a..e2f2211 100644
--- a/src/mock_server/bare_server.rs
+++ b/src/mock_server/bare_server.rs
@@ -184,6 +184,14 @@ pub struct MockGuard {
server_state: Arc<RwLock<MockServerState>>,
}
+impl MockGuard {
+ pub async fn recei... | 4 | 73 | 0 |
c4d40f6a95d3f562c361b92c3dcb92b2f076e889 | Luca Palmieri | 2022-08-04T12:52:54 | (cargo-release) version 0.5.14 | diff --git a/Cargo.lock b/Cargo.lock
index 4574fbe..72b7ccd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2264,7 +2264,7 @@ dependencies = [
[[package]]
name = "wiremock"
-version = "0.5.13"
+version = "0.5.14"
dependencies = [
"actix-rt",
"assert-json-diff",
diff --git a/Cargo.toml b/Cargo.toml
index 81417a5..... | 2 | 2 | 2 |
77eb9f8a2f73e3f4301d3fe3e5e778c1c658cf4b | Dominykas Djačenko | 2022-08-04T12:52:01 | Add matchers for Basic and Bearer Authorization types (#96)
* Add matchers for Basic and Bearer Authorization types
* Add documentation to basic_auth and bearer_token matchers | diff --git a/Cargo.lock b/Cargo.lock
index cd58f1c..4574fbe 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -467,16 +467,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "dashmap"
-version = "4.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e77a43b28d0668df09411cb0bc9a8c2adc4... | 4 | 214 | 17 |
524f8f760ec986fdf1f217fbfa24ea3c6cda3993 | Luca P | 2022-04-19T21:21:01 | (cargo-release) version 0.5.13 | diff --git a/Cargo.lock b/Cargo.lock
index b90b01b..cd58f1c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2274,7 +2274,7 @@ dependencies = [
[[package]]
name = "wiremock"
-version = "0.5.12"
+version = "0.5.13"
dependencies = [
"actix-rt",
"assert-json-diff",
diff --git a/Cargo.toml b/Cargo.toml
index 07ea868..... | 2 | 2 | 2 |
ed6636096284ed9187ad92df50c2ed82ad639b5f | Luca P | 2022-04-19T21:20:43 | Formatting | diff --git a/src/matchers.rs b/src/matchers.rs
index defb9a8..a8782f6 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -447,7 +447,7 @@ impl Match for HeaderExistsMatcher {
#[derive(Debug)]
/// Match the value of a header using a regular expression.
-/// If the header is multi-valued, all values must satisfy t... | 1 | 1 | 1 |
98ca5dd98d2e7fa9edd3ce001d5f80a3cff84a19 | Will Andrews | 2022-04-19T21:20:10 | add method for matching headers with a Regex (#91)
* add method for matching headers with a RegexSet
* Use Regex instead of RegexSet.
* Update src/matchers.rs
* Update src/matchers.rs
* Update src/matchers.rs
Co-authored-by: Luca Palmieri <lucapalmieri1993@hotmail.com> | diff --git a/src/matchers.rs b/src/matchers.rs
index 6847f80..defb9a8 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -445,6 +445,72 @@ impl Match for HeaderExistsMatcher {
}
}
+#[derive(Debug)]
+/// Match the value of a header using a regular expression.
+/// If the header is multi-valued, all values mus... | 2 | 161 | 1 |
5ba1850e76ba7187f58377cb096c256935314822 | Luca P | 2022-04-03T15:12:57 | (cargo-release) version 0.5.12 | diff --git a/Cargo.lock b/Cargo.lock
index 711b84e..b90b01b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2274,7 +2274,7 @@ dependencies = [
[[package]]
name = "wiremock"
-version = "0.5.11"
+version = "0.5.12"
dependencies = [
"actix-rt",
"assert-json-diff",
diff --git a/Cargo.toml b/Cargo.toml
index bc0a826..... | 2 | 2 | 2 |
16fdde8efbd883dded66dbc2cd2aa0383edc8410 | Sebastian Rollén | 2022-04-03T15:12:05 | Add QueryParamIsMissingMatcher (#88)
* Add QueryParamMissingMatcher
Sometimes it can be useful to match a request for an explicitly missing
parameter. For example, APIs often have a default behavior if a query
parameter is not passed. A user could therefore want to set up two mocks
- one which should respond to ... | diff --git a/src/matchers.rs b/src/matchers.rs
index afafe59..6847f80 100644
--- a/src/matchers.rs
+++ b/src/matchers.rs
@@ -783,6 +783,66 @@ impl Match for QueryParamExactMatcher {
}
}
+#[derive(Debug)]
+/// Only match requests that do **not** contain a specified query parameter.
+///
+/// ### Example:
+/// ``... | 1 | 60 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.