2 ms·
Indeed, this is how rust handles it. A mutable String or Vec has all three fields, but the borrowed slice or str has just pointer and length. Go chooses to be
by slashdev 2y ago
Indeed, this is how rust handles it.
A mutable String or Vec has all three fields, but the borrowed slice or str has just pointer and length.
Go chooses to be simpler by not having those kinds of separations, which also makes it a little less efficient under some circumstances.