Rollup merge of #31019 - andreabedini:patch-1, r=alexcrichton
Rollup merge of #31019 - andreabedini:patch-1, r=alexcrichton

Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()`
to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that.

(First PR, be nice :)

graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust