diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-11-17 11:15:46 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-11-17 11:16:26 +0300 |
commit | 1981ffbea041ad7c035ebf04b5736f3b019cea10 (patch) | |
tree | 5d3f823182361f55bd9edc4a45e0fd0d9d4747d2 /text | |
parent | 6b11284e8a83bf2c5f91f2d5d63651e0c0e1cf14 (diff) |
Provide explicit type to `Iterator::sum()` calls to avoid ambiguity
Diffstat (limited to 'text')
-rw-r--r-- | text/json/src/line_reader.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/text/json/src/line_reader.rs b/text/json/src/line_reader.rs index 4f9ceef0..cc340e73 100644 --- a/text/json/src/line_reader.rs +++ b/text/json/src/line_reader.rs @@ -202,7 +202,7 @@ impl<T: AsRef<[u8]>> LineReader<T> { // Otherwise we have to copy everything that is remaining into our // internal buffer and then return a slice from that - let len = self.queue.iter().map(|v| v.as_ref().len()).sum(); + let len = self.queue.iter().map(|v| v.as_ref().len()).sum::<usize>(); if self.buf.capacity() < len { self.buf.reserve(len - self.buf.capacity()); } |