diff --git a/src/lib.rs b/src/lib.rs index 795d13c..9b9df56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -293,6 +293,12 @@ impl ValidationContext { } } +impl FromRef<()> for ValidationContext<()> { + fn from_ref(_: &()) -> Self { + ValidationContext::default() + } +} + /// `ValidError` is the error type returned when the `Valid` extractor fails. /// /// It has two variants: