diff options
| author | Andrea Bedini <andrea@andreabedini.com> | 2016-01-19 16:29:53 +1100 |
|---|---|---|
| committer | Andrea Bedini <andrea@andreabedini.com> | 2016-01-19 16:29:53 +1100 |
| commit | 0f8fc2cb8b4e81c630d0233d416b41e80beb22d6 (patch) | |
| tree | 799f6364a65fcfac31f0978694aebe791fff05f4 /src/rustllvm/RustWrapper.cpp | |
| parent | 7a7307e5cf08ad25de62d4f9e13ddd58c59881c8 (diff) | |
| download | rust-0f8fc2cb8b4e81c630d0233d416b41e80beb22d6.tar.gz rust-0f8fc2cb8b4e81c630d0233d416b41e80beb22d6.zip | |
Improve CStr::from_ptr example in docs
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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
