]> git.proxmox.com Git - cargo.git/blobdiff - vendor/proptest/src/arbitrary/functor.rs
New upstream version 0.37.0
[cargo.git] / vendor / proptest / src / arbitrary / functor.rs
index 5dcedf3b55a7f878bf29aeea508d00cb0b7eade4..3c993acd62c4e99f1210d1da1d2ebd4f6d3a04bd 100644 (file)
@@ -24,9 +24,9 @@
 //! For these reasons, the traits here are deliberatly
 //! not exported in a convenient way.
 
-use std_facade::fmt;
+use crate::std_facade::fmt;
 
-use strategy::{Strategy, BoxedStrategy};
+use crate::strategy::{BoxedStrategy, Strategy};
 
 /// `ArbitraryF1` lets you lift a [`Strategy`] to unary
 /// type constructors such as `Box`, `Vec`, and `Option`.
@@ -92,7 +92,9 @@ pub trait ArbitraryF1<A: fmt::Debug>: fmt::Debug + Sized {
     /// [`X::lift1_with(base, Default::default())`]:
     ///     trait.ArbitraryF1.html#tymethod.lift1_with
     fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
-    where AS: Strategy<Value = A> + 'static {
+    where
+        AS: Strategy<Value = A> + 'static,
+    {
         Self::lift1_with(base, Self::Parameters::default())
     }
 
@@ -111,7 +113,8 @@ pub trait ArbitraryF1<A: fmt::Debug>: fmt::Debug + Sized {
     /// [`default()`]:
     ///     https://doc.rust-lang.org/nightly/std/default/trait.Default.html
     fn lift1_with<AS>(base: AS, args: Self::Parameters) -> BoxedStrategy<Self>
-    where AS: Strategy<Value = A> + 'static;
+    where
+        AS: Strategy<Value = A> + 'static;
 }
 
 /// `ArbitraryF2` lets you lift [`Strategy`] to binary
@@ -124,7 +127,9 @@ pub trait ArbitraryF1<A: fmt::Debug>: fmt::Debug + Sized {
 /// https://hackage.haskell.org/package/QuickCheck-2.10.1/docs/Test-QuickCheck-Arbitrary.html#t:Arbitrary2
 ///
 /// [`Strategy`]: ../proptest/strategy/trait.Strategy.html
-pub trait ArbitraryF2<A: fmt::Debug, B: fmt::Debug>: fmt::Debug + Sized {
+pub trait ArbitraryF2<A: fmt::Debug, B: fmt::Debug>:
+    fmt::Debug + Sized
+{
     /// The type of parameters that [`lift2_with`] accepts for
     /// configuration of the lifted and generated [`Strategy`]. Parameters
     /// must implement [`Default`].
@@ -174,8 +179,11 @@ pub trait ArbitraryF2<A: fmt::Debug, B: fmt::Debug>: fmt::Debug + Sized {
     ///
     /// [`default()`]:
     ///     https://doc.rust-lang.org/nightly/std/default/trait.Default.html
-    fn lift2_with<AS, BS>(fst: AS, snd: BS, args: Self::Parameters)
-        -> BoxedStrategy<Self>
+    fn lift2_with<AS, BS>(
+        fst: AS,
+        snd: BS,
+        args: Self::Parameters,
+    ) -> BoxedStrategy<Self>
     where
         AS: Strategy<Value = A> + 'static,
         BS: Strategy<Value = B> + 'static;