Address comment
This commit is contained in:
parent
4ca9be2496
commit
2a4b5dd496
1 changed files with 1 additions and 3 deletions
|
|
@ -54,9 +54,7 @@ impl StringBuilder<'_> {
|
|||
/// Returns the currently built buffer and clears it to allow consuming
|
||||
/// the result incrementally.
|
||||
pub fn take(&mut self) -> String {
|
||||
let result = self.buffer.clone(); // TODO: try removing this clone
|
||||
self.buffer.clear();
|
||||
result
|
||||
std::mem::take(&mut self.buffer)
|
||||
}
|
||||
|
||||
/// Get a slice of the remaining original string. The slice starts from
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue