Skip to content

Guide iterators #16887

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

Merged
merged 2 commits into from
Sep 15, 2014
Merged

Guide iterators #16887

merged 2 commits into from
Sep 15, 2014

Conversation

steveklabnik
Copy link
Member

This isn't ready to merge yet.

The 'containers and iterators' guide is basically just a collection of stuff that should be in the module definitions. So I'm moving the guide to just an 'iterators' guide, and moved the info that was there into the right places.

So, is this a good path forward, and is all of the information still correct?

@@ -9,7 +9,7 @@
[type: text] src/doc/complement-design-faq.md $lang:doc/l10n/$lang/complement-design-faq.md
[type: text] src/doc/complement-lang-faq.md $lang:doc/l10n/$lang/complement-lang-faq.md
[type: text] src/doc/complement-project-faq.md $lang:doc/l10n/$lang/complement-project-faq.md
[type: text] src/doc/guide-container.md $lang:doc/l10n/$lang/guide-container.md
[type: text] src/doc/guide-iterator.md $lang:doc/l10n/$lang/guide-iterator.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it guide-iterators.md and not guide-iterator.md?

@huonw
Copy link
Member

huonw commented Aug 31, 2014

Another possibility to having a whole guide-iterators is having the docs of std::iter be the "iterator guide" (#9314), and similarly the doc string of std::collections could be beefed up to fill the 'introduction to containers in Rust' niche (if we need such a thing).

@steveklabnik
Copy link
Member Author

@huonw I like that approach, I think

@EduardoBautista nice catch.

@steveklabnik steveklabnik force-pushed the guide_iterators branch 2 times, most recently from 3d90833 to c732bce Compare September 5, 2014 12:46
@steveklabnik
Copy link
Member Author

@huonw updated to just do that instead.

I will beef up those docstrings when I do the module-level docs.

//!
//! `RingBuf` implements the trait `Deque`. It should be imported with
//! `use collections::Deque`.
//! This crate implements a double-ended queue with `O(1)` amortized inserts and removals from both
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line must be really close to 100, if it's not over.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I let vim handle such things, maybe I should double check.

@huonw
Copy link
Member

huonw commented Sep 5, 2014

Maybe this should be deprecated rather than outright removed, to avoid killing every link completely?

@steveklabnik
Copy link
Member Author

At what period do deprecated guides get removed? And they're in the wayback machine anyway. Historically, we've just deleted guides.

@huonw
Copy link
Member

huonw commented Sep 5, 2014

Historically, we've just deleted guides

Which guides have been deleted recently? I don't actually remember any.

In any case, it doesn't take much effort to leave it hanging around with a message for a while, at least until the modules themselves have some more info; especially since nothing is particularly wrong in it (there's a few wrong module paths, but that's all, as far as I could see with a quick scan)?

And they're in the wayback machine anyway.

Maybe our 404 page could have a link to the appropriate wayback search? (I don't think many people will take the page and look in the wayback machine unprompted, they'll just click the link to this page on the SO post, on reddit or some blog post and then get a discouraging impression with the 404 page staring back. We don't have to go out of the way to avoid this, since we're pre-1.0, but we can still try to be helpful.)

Of course, if you have a reason for just removing the old pages outright (e.g. cleaning up the organisation or something), that's fine.

@steveklabnik
Copy link
Member Author

I'm thinking specifically of the Conditions Guide. I thought there were more, but I can't remember off the top of my head.

It's true that it doesn't take a lot of effort, it's just then you have to have a policy of how long, you have to remember to do it after that time, etc.

I guess I just lean on the side of 'urls go away, thats the way it is.' It's not a super big deal either way, really, I guess. Feels weird to have a bunch of empty markdown files just lying around in the repo.

@steveklabnik
Copy link
Member Author

(this will also impact the 'runtime guide,' which will probably end up just getting nuked if the IO reform RFC is accepted)

@steveklabnik steveklabnik force-pushed the guide_iterators branch 2 times, most recently from 3cdbf36 to 7aa9f39 Compare September 8, 2014 21:26
@steveklabnik
Copy link
Member Author

Added deprecations and rebased off of master.

@steveklabnik
Copy link
Member Author

This looks like not my failure...

@alexcrichton
Copy link
Member

It looks like a merge gone wrong maybe? Was src/libstd/collections/hashmap.rs accidentally reinstated?

@steveklabnik
Copy link
Member Author

Ugh probably rebase gone wrong. I'll look into this soon.

Sent from my iPhone

On Sep 13, 2014, at 10:37, Alex Crichton notifications@github.com wrote:

It looks like a merge gone wrong maybe? Was src/libstd/collections/hashmap.rs accidentally reinstated?


Reply to this email directly or view it on GitHub.

This isn't really what guides are for, this information belongs in the
module-level docs.

Fixes rust-lang#9314.
@steveklabnik
Copy link
Member Author

@alexcrichton fixed

@alexcrichton
Copy link
Member

Feel free to r=reviewer if you update for just small bugfixes!

bors added a commit that referenced this pull request Sep 15, 2014
This isn't ready to merge yet.

The 'containers and iterators' guide is basically just a collection of stuff that should be in the module definitions. So I'm moving the guide to just an 'iterators' guide, and moved the info that was there into the right places.

So, is this a good path forward, and is all of the information still correct?
@bors bors closed this Sep 15, 2014
@bors bors merged commit 1b81802 into rust-lang:master Sep 15, 2014
@steveklabnik steveklabnik deleted the guide_iterators branch October 25, 2017 18:26
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.

5 participants