You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got used to Rust's naming conventions and among them there's a less official one that recommends to name 'free' type casting functions as 'as_something()' and expensive ones as 'to_something()'
Surface::as_texture() actually creates a new texture and copies surface data into it, so I believe it should be named to_texture()
Grep'ed the code and found several more cases like:
./src/sdl2/video.rs:98: fn to_gl_value(self) -> i32 { self as i32 }
It is problematic to change the APIs as there must be a lot of projects building on top of rust-sdl2, but maybe as_texture() and others could be declared obsolete and removed when version bump allows that?