Skip to content

Commit e54f312

Browse files
committed
---
yaml --- r: 64663 b: refs/heads/snap-stage3 c: 9c3679a h: refs/heads/master i: 64661: 8e3f364 64659: bb1b837 64655: 7a103c6 v: v3
1 parent 4cf24ae commit e54f312

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d573ecd1f99944ca45837cbfc2efddcbddae8761
4+
refs/heads/snap-stage3: 9c3679a9a2caeacdd16735c64ab4837721287e64
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/str.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ pub trait OwnedStr {
20282028
fn pop_char(&mut self) -> char;
20292029
fn shift_char(&mut self) -> char;
20302030
fn unshift_char(&mut self, ch: char);
2031-
fn append(&self, rhs: &str) -> ~str; // FIXME #4850: this should consume self.
2031+
fn append(self, rhs: &str) -> ~str;
20322032
fn reserve(&mut self, n: uint);
20332033
fn reserve_at_least(&mut self, n: uint);
20342034
fn capacity(&self) -> uint;
@@ -2162,11 +2162,10 @@ impl OwnedStr for ~str {
21622162
21632163
/// Concatenate two strings together.
21642164
#[inline]
2165-
fn append(&self, rhs: &str) -> ~str {
2166-
// FIXME #4850: this should consume self, but that causes segfaults
2167-
let mut v = self.clone();
2168-
v.push_str_no_overallocate(rhs);
2169-
v
2165+
fn append(self, rhs: &str) -> ~str {
2166+
let mut new_str = self;
2167+
new_str.push_str_no_overallocate(rhs);
2168+
new_str
21702169
}
21712170
21722171
/**

0 commit comments

Comments
 (0)