1
0
mirror of https://github.com/rust-unofficial/awesome-rust.git synced 2024-11-26 18:51:55 +02:00

add section 'Text search'

This commit is contained in:
kud1ing 2016-12-28 17:32:40 +01:00
parent bfd3ca9ca4
commit 2978c44acc
2 changed files with 12 additions and 3 deletions

View File

@ -50,6 +50,7 @@ If you want to contribute, please read [this](CONTRIBUTING.md).
- [Platform specific](#platform-specific)
- [Template engine](#template-engine)
- [Text processing](#text-processing)
- [Text search](#text-search)
- [Virtualization](#virtualization)
- [Web programming](#web-programming)
- [Resources](#resources)
@ -748,6 +749,13 @@ See also [About Rust’s Machine Learning Community](https://medium.com/@autumn_
* [rust-lang-nursery/regex](https://github.com/rust-lang-nursery/regex) — Regular expressions (RE2 style) [<img src="https://travis-ci.org/rust-lang-nursery/regex.svg?branch=master">](https://travis-ci.org/rust-lang-nursery/regex)
## Text search
* [BurntSushi/fst](https://github.com/BurntSushi/fst) [[fst](https://crates.io/crates/fst)] — [<img src="https://travis-ci.org/BurntSushi/fst.svg?branch=master">](https://travis-ci.org/BurntSushi/fst)
* [JDemler/perlin](https://github.com/JDemler/perlin) [[perlin](https://crates.io/crates/perlin)] — [<img src="https://travis-ci.org/JDemler/perlin.svg?branch=master">](https://travis-ci.org/JDemler/perlin)
* [tantivy-search/tantivy](https://github.com/tantivy-search/tantivy) [[tantivy](https://crates.io/crates/tantivy)] — [<img src="https://travis-ci.org/tantivy-search/tantivy.svg?branch=master">](https://travis-ci.org/tantivy-search/tantivy)
### Virtualization
* [beneills/quantum](https://github.com/beneills/quantum) — Advanced Rust quantum computer simulator [<img src="https://travis-ci.org/beneills/quantum.svg?branch=master">](https://travis-ci.org/beneills/quantum)

View File

@ -101,7 +101,7 @@ fn parse_header(parser: &mut Parser, content: &mut ReadmeFileContent) -> ReadmeF
fn parse_toc(parser: &mut Parser, content: &mut ReadmeFileContent) -> ReadmeFileParsingState {
// TODO
// TODO: Skip the table of content.
println!("TODO: `parse_toc()`");
ReadmeFileParsingState::Content
@ -127,6 +127,7 @@ fn parse_footer<'a>(parser: &mut Parser<'a>, content: &mut ReadmeFileContent<'a>
fn main() {
// The path to the README.md file.
let readme_file_path = Path::new("README.md");
let display = readme_file_path.display();
@ -137,14 +138,14 @@ fn main() {
Ok(file) => file,
};
// Try to read the README.md file in a string.
let mut markdown_string = String::new();
// Try to read the README.md file in a string.
if let Err(why) = file.read_to_string(&mut markdown_string) {
panic!("couldn't read {}: {}", display, why.description());
}
// Try to parse the Markdown content string.
// Try to parse the README.md content string.
let readme_file_content = parse(&markdown_string);
println!("{:?}", readme_file_content);