]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/str.rs
Auto merge of #23293 - tbu-:pr_additive_multiplicative, r=alexcrichton
[rust.git] / src / libcollections / str.rs
index 28ba7369d52a3ffac26418334130ce0f0d5032bb..98f2933effc2cf94667a5c87a9d372ba19625b0c 100644 (file)
@@ -53,7 +53,6 @@
 use self::DecompositionType::*;
 
 use core::clone::Clone;
-use core::iter::AdditiveIterator;
 use core::iter::{Iterator, Extend};
 use core::option::Option::{self, Some, None};
 use core::result::Result;
@@ -116,7 +115,7 @@ fn connect(&self, sep: &str) -> String {
         // this is wrong without the guarantee that `self` is non-empty
         // `len` calculation may overflow but push_str but will check boundaries
         let len = sep.len() * (self.len() - 1)
-            + self.iter().map(|s| s.as_ref().len()).sum();
+            + self.iter().map(|s| s.as_ref().len()).sum::<usize>();
         let mut result = String::with_capacity(len);
         let mut first = true;