Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method order in mio::net #664

Closed
dtolnay opened this Issue Aug 18, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@dtolnay
Copy link

dtolnay commented Aug 18, 2017

TcpListener and TcpStream have setters before getters, UdpSocket has getters before setters. I don't have a preference, but reading the docs would be a smoother experience if all three were consistent.

// TcpListener
fn set_ttl(&self, ttl: u32) -> Result<()>;
fn ttl(&self) -> Result<u32>;
// UdpSocket
fn ttl(&self) -> Result<u32>;
fn set_ttl(&self, ttl: u32) -> Result<()>;

(Same for all the getters and setters, not just ttl.)

ahmedcharles added a commit to ahmedcharles/mio that referenced this issue Aug 20, 2017

alexcrichton added a commit that referenced this issue Aug 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.