mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
drm/panic: use core::ffi::CStr method names
Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by avoid methods that only exist on the latter. Link: https://github.com/Rust-for-Linux/linux/issues/1075 Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Acked-by: Jocelyn Falempe <jfalempe@redhat.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
eb98599528
commit
7dfabaa0c4
|
|
@ -968,7 +968,7 @@ fn draw_all(&mut self, data: impl Iterator<Item = u8>) {
|
|||
// nul-terminated string.
|
||||
let url_cstr: &CStr = unsafe { CStr::from_char_ptr(url) };
|
||||
let segments = &[
|
||||
&Segment::Binary(url_cstr.as_bytes()),
|
||||
&Segment::Binary(url_cstr.to_bytes()),
|
||||
&Segment::Numeric(&data_slice[0..data_len]),
|
||||
];
|
||||
match EncodedMsg::new(segments, tmp_slice) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user