1
0
Fork 0
forked from wry/wry

utils: remove AsciiTrim trait

This commit is contained in:
Julian Orth 2025-01-06 20:09:33 +01:00
parent 0d1aeeab45
commit 32cb00444b
7 changed files with 22 additions and 53 deletions

View file

@ -1,12 +1,9 @@
use {
crate::{
gfx_apis::gl::{
egl::sys::{EGLDisplay, EGL_EXTENSIONS},
gl::sys::GL_EXTENSIONS,
sys::{EGL, GLESV2},
RenderError,
},
utils::trim::AsciiTrim,
crate::gfx_apis::gl::{
egl::sys::{EGLDisplay, EGL_EXTENSIONS},
gl::sys::GL_EXTENSIONS,
sys::{EGL, GLESV2},
RenderError,
},
ahash::AHashSet,
bstr::ByteSlice,
@ -21,7 +18,7 @@ unsafe fn get_extensions(ext: *const c::c_char) -> Option<AHashSet<String>> {
let mut res = AHashSet::new();
let ext = unsafe { CStr::from_ptr(ext).to_bytes() };
for part in ext.split_str(" ") {
let name = part.trim();
let name = part.trim_ascii();
if name.len() > 0 {
if let Ok(s) = str::from_utf8(name) {
res.insert(s.to_string());