From c6060d6a5497545031a39729606a41433a2e0021 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sat, 3 Apr 2021 15:33:10 -0600 Subject: make LineNumbers bounds non-ugly --- src/makefile/input.rs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/makefile/input.rs b/src/makefile/input.rs index 42187f4..2b85376 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -87,21 +87,25 @@ fn inference_match<'a>( } } -struct LineNumbers>>( - Inner, - usize, -); - -impl>> - LineNumbers +struct LineNumbers(Inner, usize) +where + E: StdError + Send + Sync + 'static, + Inner: Iterator>; + +impl LineNumbers +where + E: StdError + Send + Sync + 'static, + Inner: Iterator>, { fn new(inner: Inner) -> Self { Self(inner, 0) } } -impl>> Iterator - for LineNumbers +impl Iterator for LineNumbers +where + E: StdError + Send + Sync + 'static, + Inner: Iterator>, { type Item = (usize, Result); -- cgit v1.2.3