docs(users/profpatsch/blog): rust string conversions: &str -> &OsStr

Change-Id: I215cd311551d54ce42c71d4e80ea18f9a17d4cf8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3879
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2021-11-15 01:13:52 +01:00
parent 1ef8a6c153
commit 70d01b201f

View file

@ -14,6 +14,7 @@ From To Use Comment
&str -> String String::from(st)
&str -> &[u8] st.as_bytes()
&str -> Vec<u8> st.as_bytes().to_owned() via &[u8]
&str -> &OsStr OsStr::new(st)
String -> &str &s alt. s.as_str()
String -> &[u8] s.as_bytes()