diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-03 15:33:10 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-03 15:33:10 -0600 |
commit | c6060d6a5497545031a39729606a41433a2e0021 (patch) | |
tree | bdbb1fec298e08d286b65c4151c3bb9e2d55e611 /src | |
parent | 86acf32eca80443b78f30271483ee2d8fb5c96b2 (diff) | |
download | makers-c6060d6a5497545031a39729606a41433a2e0021.tar.gz makers-c6060d6a5497545031a39729606a41433a2e0021.zip |
make LineNumbers bounds non-ugly
Diffstat (limited to 'src')
-rw-r--r-- | src/makefile/input.rs | 22 |
1 files changed, 13 insertions, 9 deletions
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<T, E: StdError + Send + Sync + 'static, Inner: Iterator<Item = Result<T, E>>>( - Inner, - usize, -); - -impl<T, E: StdError + Send + Sync + 'static, Inner: Iterator<Item = Result<T, E>>> - LineNumbers<T, E, Inner> +struct LineNumbers<T, E, Inner>(Inner, usize) +where + E: StdError + Send + Sync + 'static, + Inner: Iterator<Item = Result<T, E>>; + +impl<T, E, Inner> LineNumbers<T, E, Inner> +where + E: StdError + Send + Sync + 'static, + Inner: Iterator<Item = Result<T, E>>, { fn new(inner: Inner) -> Self { Self(inner, 0) } } -impl<T, E: StdError + Send + Sync + 'static, Inner: Iterator<Item = Result<T, E>>> Iterator - for LineNumbers<T, E, Inner> +impl<T, E, Inner> Iterator for LineNumbers<T, E, Inner> +where + E: StdError + Send + Sync + 'static, + Inner: Iterator<Item = Result<T, E>>, { type Item = (usize, Result<T>); |