tdfischer / pto

IRC to Matrix bridge
Apache License 2.0
48 stars 8 forks source link

Fix privacy warnings. #35

Closed elinorbgr closed 8 years ago

elinorbgr commented 8 years ago

Using the latest nightly compiler (1.8.0), these warnings are generated compiling PTO:

src/bridge.rs:238:76: 238:80 warning: private type in public interface, #[warn(private_in_public)] on by default
src/bridge.rs:238     pub fn room_from_matrix(&mut self, id: &matrix::model::RoomID) -> &mut Room {
                                                                                             ^~~~
src/bridge.rs:238:76: 238:80 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
src/bridge.rs:238:76: 238:80 note: for more information, see the explanation for E0446 (`--explain E0446`)
src/bridge.rs:248:65: 248:69 warning: private type in public interface, #[warn(private_in_public)] on by default
src/bridge.rs:248     pub fn room_from_irc(&mut self, id: &String) -> Option<&mut Room> {
                                                                                  ^~~~
src/bridge.rs:248:65: 248:69 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
src/bridge.rs:248:65: 248:69 note: for more information, see the explanation for E0446 (`--explain E0446`)

This PR fixes the warnings (which are going to be an error) by removing the pub qualifier on these to functions, as they do not seem to need it.

tdfischer commented 8 years ago

Thanks! I'm currently only running Rust 1.5. If you find other bugs from the future, let me know :+1: