Closed KSXGitHub closed 1 year ago
@anonrig So you really just added mut
there by mistake then?
@anonrig So you really just added
mut
there by mistake then?
I think it had to do with origin returning a new string owned by the C, but I don't remember.
@anonrig But the origin
method still doesn't modify the internal state at all, right?
I think it had to do with origin returning a new string owned by the C
The origin
method already returns &str
, which is an immutable reference. The only guarantee you need to make is that the string must live at least as long as the Url
struct.
@anonrig Is there any reason
origin
must take mutableself
? If not, this can be merged. If there is a reason, feel free to close this PR.