edition: run 'cargo fix --edition --edition-idioms --all'

This commit is contained in:
Andrew Gallant
2021-06-01 19:47:46 -04:00
parent 77a9e99964
commit af54069c51
36 changed files with 107 additions and 137 deletions

View File

@@ -625,7 +625,7 @@ impl<W> Standard<W> {
/// * `W` refers to the underlying writer that this printer is writing its
/// output to.
#[derive(Debug)]
pub struct StandardSink<'p, 's, M: Matcher, W: 's> {
pub struct StandardSink<'p, 's, M: Matcher, W> {
matcher: M,
standard: &'s mut Standard<W>,
replacer: Replacer<M>,
@@ -784,7 +784,7 @@ impl<'p, 's, M: Matcher, W: WriteColor> Sink for StandardSink<'p, 's, M, W> {
fn matched(
&mut self,
searcher: &Searcher,
mat: &SinkMatch,
mat: &SinkMatch<'_>,
) -> Result<bool, io::Error> {
self.match_count += 1;
// When we've exceeded our match count, then the remaining context
@@ -825,7 +825,7 @@ impl<'p, 's, M: Matcher, W: WriteColor> Sink for StandardSink<'p, 's, M, W> {
fn context(
&mut self,
searcher: &Searcher,
ctx: &SinkContext,
ctx: &SinkContext<'_>,
) -> Result<bool, io::Error> {
self.standard.matches.clear();
self.replacer.clear();
@@ -904,7 +904,7 @@ impl<'p, 's, M: Matcher, W: WriteColor> Sink for StandardSink<'p, 's, M, W> {
/// A StandardImpl is initialized every time a match or a contextual line is
/// reported.
#[derive(Debug)]
struct StandardImpl<'a, M: 'a + Matcher, W: 'a> {
struct StandardImpl<'a, M: Matcher, W> {
searcher: &'a Searcher,
sink: &'a StandardSink<'a, 'a, M, W>,
sunk: Sunk<'a>,
@@ -916,7 +916,7 @@ impl<'a, M: Matcher, W: WriteColor> StandardImpl<'a, M, W> {
/// Bundle self with a searcher and return the core implementation of Sink.
fn new(
searcher: &'a Searcher,
sink: &'a StandardSink<M, W>,
sink: &'a StandardSink<'_, '_, M, W>,
) -> StandardImpl<'a, M, W> {
StandardImpl {
searcher: searcher,
@@ -930,7 +930,7 @@ impl<'a, M: Matcher, W: WriteColor> StandardImpl<'a, M, W> {
/// for use with handling matching lines.
fn from_match(
searcher: &'a Searcher,
sink: &'a StandardSink<M, W>,
sink: &'a StandardSink<'_, '_, M, W>,
mat: &'a SinkMatch<'a>,
) -> StandardImpl<'a, M, W> {
let sunk = Sunk::from_sink_match(
@@ -945,7 +945,7 @@ impl<'a, M: Matcher, W: WriteColor> StandardImpl<'a, M, W> {
/// for use with handling contextual lines.
fn from_context(
searcher: &'a Searcher,
sink: &'a StandardSink<M, W>,
sink: &'a StandardSink<'_, '_, M, W>,
ctx: &'a SinkContext<'a>,
) -> StandardImpl<'a, M, W> {
let sunk = Sunk::from_sink_context(