Skip to content

docs: fix memmap2 link and drop unused Streamer import#180

Open
c-tonneslan wants to merge 1 commit into
BurntSushi:masterfrom
c-tonneslan:doc-fixes
Open

docs: fix memmap2 link and drop unused Streamer import#180
c-tonneslan wants to merge 1 commit into
BurntSushi:masterfrom
c-tonneslan:doc-fixes

Conversation

@c-tonneslan

Copy link
Copy Markdown

Two small crate-level doc cleanups, both called out in #161 and #152:

  1. The "Example: stream to a file and memory map it" section linked to https://crates.io/memmap2 which 404s; canonical URL is https://crates.io/crates/memmap2.
  2. Two examples imported Streamer alongside IntoStreamer but never called any of its methods — the rest of the code uses into_strs / into_str_vec which are inherent on the concrete Stream type. The third example (case-insensitive search) already only imports IntoStreamer, so this just matches that.

cargo test --doc still passes:

test result: ok. 36 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out

Closes #161. Closes #152.

The crate-level docs in lib.rs had two small issues called out in
BurntSushi#161 and BurntSushi#152:

- The "Example: stream to a file and memory map it" section linked to
  https://crates.io/memmap2 which is a 404; the canonical URL is
  https://crates.io/crates/memmap2.
- Two of the examples wrote `use fst::{IntoStreamer, Streamer, ...}`
  but never called any Streamer methods. `into_strs` / `into_str_vec`
  are inherent on Stream, so the trait import is dead. Dropping it
  matches the third example which already only imports IntoStreamer.

Doctests still pass with the imports trimmed.

Closes BurntSushi#161. Closes BurntSushi#152.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
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.

[Documentation] Fix references to the memmap crate in documentation so that Unused traits in code examples

1 participant