Allow matching on bool for in src/types/unit_true.rs

This commit is contained in:
Waffle 2019-10-13 14:59:22 +03:00
parent 101630a3a1
commit c466402594

View file

@ -8,6 +8,7 @@ impl std::convert::TryFrom<bool> for True {
type Error = (); type Error = ();
fn try_from(value: bool) -> Result<Self, Self::Error> { fn try_from(value: bool) -> Result<Self, Self::Error> {
#[allow(clippy::match_bool)]
match value { match value {
true => Ok(True), true => Ok(True),
false => Err(()), false => Err(()),
@ -37,6 +38,7 @@ impl<'de> Visitor<'de> for TrueVisitor {
where where
E: de::Error, E: de::Error,
{ {
#[allow(clippy::match_bool)]
match value { match value {
true => Ok(True), true => Ok(True),
false => Err(E::custom("expected `true`, found `false`")), false => Err(E::custom("expected `true`, found `false`")),