News for hackers. Stuff that matters.
Re:A pair of Rust kernel modules by tialaramex on Friday September 23, 2022 @12:25PM (#32954001)
Rust's standard library String implements AddAssign, the effect of which is that the += operator exists, in effect a += b is sugar for AddAssign::add_assign(&mut a, b)

Personally I would rather it didn't, but the use of + as a concatenate operator is widespread and I imagine if String didn't do this a popular BetterString would.

No, the Rust for Linux String doesn't have push_str(), see for yourself: https://rust-for-linux.github.io/docs/alloc/string/struct.St... that String also has no way to do infallible reserve(), and doesn't implement Write among other differences.

There are no comments on this comment yet.