summaryrefslogtreecommitdiff
path: root/Difference between string slice and slice of strings.md
blob: 1105ce79d924a78a6d9ca0b60ad1ad2a2a7d6349 (plain)
1
2
3
4
A string slice: `&str`
A slice of strings: `&[String]`

`&[String]` for example can be used to reference a subset of a `Vec<String>` while `&str` references part of a `String`.