fn eq(&self, other: &String) -> bool {
        PartialEq::eq(&self[..], &other[..])
    }
Implements the `+` operator for concatenating two strings.

This consumes the `String` on the left-hand side and re-uses its buffer (growing it if
necessary). This is done to avoid allocating a new `String` and copying the entire contents on
every operation, which would lead to *O*(*n*^2) running time when building an *n*-byte string by
repeated concatenation.

The string on the right-hand side is only borrowed; its contents are copied into the returned
`String`.

# Examples

Concatenating two `String`s takes the first by value and borrows the second:

```
let a = String::from("hello");
let b = String::from(" world");
let c = a + &b;
// `a` is moved and can no longer be used h
benchmarks/haystacks/code/rust-library.rs