Skip to content

Conversation

tshepang
Copy link
Member

No description provided.

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Jan 21, 2016

@steveklabnik likes to have examples attached to every function, and this does show how to use new. Even if it duplicates other examples used for other purposes it may still be valuable.

@tshepang
Copy link
Member Author

I think there isn't enough value providing examples for new(), especially if they don't even take arguments. Failing that, would it be enough to remove the last line in the example since it's demonstrating something else?

@steveklabnik
Copy link
Contributor

Don't underestimate how important examples, even the simplest, are to people getting started. Yes, it's not particularly exciting, but it is valuable.

That's why the last line matters, it's an example of how to use new to accomplish the task you've set out to do: actually open a thing.

I can sort of see removing the last line. Not every example has only the exact thing it's showing off; they often show how they interact with other bits of the API.

@tshepang tshepang closed this Jan 22, 2016
@tshepang tshepang deleted the needless-example branch January 22, 2016 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants