diff options
author | Andrew Gallant <jamslam@gmail.com> | 2019-06-16 18:37:51 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-06-16 18:37:51 -0400 |
commit | 7b9972c30876797103d6b51c14dd8f9bf1001c92 (patch) | |
tree | fa4e1c6c75c23de5a5552470d173e02d78bd5575 /grep-searcher | |
parent | 9f000c29109cf369c4c28254f0cf9b9216a1950d (diff) |
style: fix deprecations
Use `dyn` for trait objects and use `..=` for inclusive ranges.
Diffstat (limited to 'grep-searcher')
-rw-r--r-- | grep-searcher/src/sink.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/grep-searcher/src/sink.rs b/grep-searcher/src/sink.rs index 63a8ae24..74fba00b 100644 --- a/grep-searcher/src/sink.rs +++ b/grep-searcher/src/sink.rs @@ -1,3 +1,4 @@ +use std::error; use std::fmt; use std::io; @@ -49,9 +50,9 @@ impl SinkError for io::Error { /// A `Box<std::error::Error>` can be used as an error for `Sink` /// implementations out of the box. -impl SinkError for Box<::std::error::Error> { - fn error_message<T: fmt::Display>(message: T) -> Box<::std::error::Error> { - Box::<::std::error::Error>::from(message.to_string()) +impl SinkError for Box<dyn error::Error> { + fn error_message<T: fmt::Display>(message: T) -> Box<dyn error::Error> { + Box::<dyn error::Error>::from(message.to_string()) } } |