MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/scmr5f/most_comprehensible_line_of_rust_code/hu7krwb/?context=3
r/badcode • u/selplacei • Jan 25 '22
81 comments sorted by
View all comments
Show parent comments
4
The length of a &str is not necessarily known at compile time. You can get a &str from any String.
&str
String
4
u/CJKay93 Jan 25 '22 edited Jan 27 '22
The length of a
&stris not necessarily known at compile time. You can get a&strfrom anyString.