From d31583a8260e01c690fe594e626deea8bacefc94 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 13 Feb 2020 12:11:43 +0100 Subject: [PATCH] Silence clippy warning --- src/util.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util.rs b/src/util.rs index 2a5c9631..03fbb589 100644 --- a/src/util.rs +++ b/src/util.rs @@ -56,6 +56,8 @@ where T: serde::Deserialize<'de>, { let opt = Option::::deserialize(de)?; + // TODO: Switch to and remove this attribute `opt.as_deref()` once MSRV is >= 1.40 + #[allow(clippy::clippy::option_as_ref_deref)] let opt = opt.as_ref().map(String::as_str); match opt { None | Some("") => Ok(None),