brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

Don't export the inner "sdl" module #42

Closed pcwalton closed 11 years ago

pcwalton commented 11 years ago

This one might be controversial, so this is as much an RFC as anything:

Several people have gotten confused when trying to import sdl::sdl. It's never necessary to do that, because rust-sdl reexports everything under there anyway. For example, you can write sdl::init() instead of sdl::sdl::init(). So I propose just not exporting that inner module.

AngryLawyer commented 11 years ago

Well, if you can access everything that's needed in the inner SDL (such as the error functions and starting SDL!) without exporting it, I don't see why it would be a bad thing to prevent access to save confusion. SDL can be confusing at the best of times so every little will help.

I'll merge this in if nobody has complaints.

AngryLawyer commented 11 years ago

Thanks @pcwalton