mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 18:25:30 +00:00
Provide explicit type to Iterator::sum()
calls to avoid ambiguity
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/986>
This commit is contained in:
parent
8bd9de8d48
commit
582cc34895
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