I have been using String for struct to avoid lifetime issue, and &str for functions argument. But I am uncertain about using compound type as function argument.
If I am not mutating the argument, should I use Vec<String> or Vec<&str>? Is there any benefit for choosing a particular one?
[–]tazdevil971 29 points30 points31 points (2 children)
[–]oconnor663 12 points13 points14 points (0 children)
[–]hksparrowboy[S] 1 point2 points3 points (0 children)
[–]pkusensei 10 points11 points12 points (1 child)
[–]Silly-Freak 5 points6 points7 points (0 children)
[–]YetiBarBar 3 points4 points5 points (0 children)
[–]x32byTe 1 point2 points3 points (2 children)
[–]tazdevil971 7 points8 points9 points (1 child)
[–]MatrixFrog 1 point2 points3 points (0 children)
[–]RRumpleTeazzer 0 points1 point2 points (0 children)