From e6951463f518467945b04da847ca7107c87ed61a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 4 Jun 2021 19:46:49 -0700 Subject: [PATCH] Resolve bare_trait_objects warning warning: trait objects without an explicit `dyn` are deprecated --> src/ignore.rs:48:12 | 48 | Ok(Visitor::ignore()) | ^^^^^^^ help: use `dyn`: `` | = note: `#[warn(bare_trait_objects)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! = note: for more information, see issue #80165 warning: trait objects without an explicit `dyn` are deprecated --> src/ignore.rs:58:12 | 58 | Ok(Visitor::ignore()) | ^^^^^^^ help: use `dyn`: `` | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! = note: for more information, see issue #80165 --- src/ignore.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ignore.rs b/src/ignore.rs index e01c6ac..c4f93f5 100644 --- a/src/ignore.rs +++ b/src/ignore.rs @@ -45,7 +45,7 @@ impl Visitor for Ignore { impl Seq for Ignore { fn element(&mut self) -> Result<&mut dyn Visitor> { - Ok(Visitor::ignore()) + Ok(::ignore()) } fn finish(&mut self) -> Result<()> { @@ -55,7 +55,7 @@ impl Seq for Ignore { impl Map for Ignore { fn key(&mut self, _k: &str) -> Result<&mut dyn Visitor> { - Ok(Visitor::ignore()) + Ok(::ignore()) } fn finish(&mut self) -> Result<()> {