mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix warnings in util.
This commit is contained in:
parent
b25564440d
commit
830e6741c7
9 changed files with 35 additions and 32 deletions
|
@ -44,7 +44,7 @@ impl<T> VecLike<T> for Vec<T> {
|
|||
|
||||
#[inline]
|
||||
fn vec_slice_mut<'a>(&'a mut self, start: uint, end: uint) -> &'a mut [T] {
|
||||
self.slice_mut(start, end)
|
||||
&mut self[start..end]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ macro_rules! def_small_vector(
|
|||
}
|
||||
|
||||
impl<T> FromIterator<T> for $name<T> {
|
||||
fn from_iter<I: Iterator<Item=T>>(mut iter: I) -> $name<T> {
|
||||
fn from_iter<I: Iterator<Item=T>>(iter: I) -> $name<T> {
|
||||
let mut v = $name::new();
|
||||
|
||||
let (lower_size_bound, _) = iter.size_hint();
|
||||
|
@ -428,7 +428,7 @@ macro_rules! def_small_vector(
|
|||
}
|
||||
|
||||
impl<T> $name<T> {
|
||||
pub fn extend<I: Iterator<Item=T>>(&mut self, mut iter: I) {
|
||||
pub fn extend<I: Iterator<Item=T>>(&mut self, iter: I) {
|
||||
let (lower_size_bound, _) = iter.size_hint();
|
||||
|
||||
let target_len = self.len() + lower_size_bound;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue