mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-10-31 22:58:51 +00:00
Provide explicit type to Iterator::sum()
calls to avoid ambiguity
This commit is contained in:
parent
6b11284e8a
commit
1981ffbea0
2 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue