[vlc-commits] [Git][videolan/vlc][master] vlcrs-core: convert: add missing qualification

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jan 22 17:21:48 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
a80002a0 by Alexandre Janniaux at 2026-01-22T16:32:16+00:00
vlcrs-core: convert: add missing qualification

std::from_utf8 is from std.
See https://doc.rust-lang.org/std/str/fn.from_utf8.html

    error[E0599]: no function or associated item named `from_utf8` found for type `str` in the current scope
    --> src/rust/vlcrs-core/src/convert.rs:62:18
    |
    62 |             str::from_utf8(self.to_bytes()).expect("Unexpected invalid UTF8 coming from VLC")
    |                  ^^^^^^^^^ function or associated item not found in `str`
    |
    help: you are looking for the module in `std`, not the primitive type
    |
    62 |             std::str::from_utf8(self.to_bytes()).expect("Unexpected invalid UTF8 coming from VLC")
    |             +++++

- - - - -


1 changed file:

- src/rust/vlcrs-core/src/convert.rs


Changes:

=====================================
src/rust/vlcrs-core/src/convert.rs
=====================================
@@ -59,9 +59,9 @@ impl<'a> AssumeValid<&'a str> for &'a std::ffi::CStr {
     /// highlight and help resolve VLC core missing checks.
     unsafe fn assume_valid(self) -> &'a str {
         if cfg!(debug_assertions) {
-            str::from_utf8(self.to_bytes()).expect("Unexpected invalid UTF8 coming from VLC")
+            std::str::from_utf8(self.to_bytes()).expect("Unexpected invalid UTF8 coming from VLC")
         } else {
-            unsafe { str::from_utf8_unchecked(self.to_bytes()) }
+            unsafe { std::str::from_utf8_unchecked(self.to_bytes()) }
         }
     }
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a80002a01acd7151f020621de0e3ef26cccba5b1

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a80002a01acd7151f020621de0e3ef26cccba5b1
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list