Skip to content

Commit 071410b

Browse files
committed
string: remove needless binding
1 parent 0ef24ee commit 071410b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcollections/string.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,7 @@ impl String {
11821182
reason = "recent addition",
11831183
issue = "0")]
11841184
pub fn insert_str(&mut self, idx: usize, string: &str) {
1185-
let len = self.len();
1186-
assert!(idx <= len);
1185+
assert!(idx <= self.len());
11871186
assert!(self.is_char_boundary(idx));
11881187

11891188
unsafe {

0 commit comments

Comments
 (0)