andxor , 1 month ago @became_fish that would be a slice: let s = "abc"; foo(&s[1..2]); // read-only slice let mut s = String::from("abc"); bar(&mut s[1..2]); // read-write slice
@became_fish that would be a slice:
let s = "abc"; foo(&s[1..2]); // read-only slice
let mut s = String::from("abc"); bar(&mut s[1..2]); // read-write slice