From c1998a657e841fab135fefa29c0cd8706914de4f Mon Sep 17 00:00:00 2001 From: ibraheemdev Date: Wed, 3 Mar 2021 16:22:36 -0500 Subject: [PATCH] 0.3.1 --- Cargo.toml | 2 +- README.md | 2 +- src/chi.rs | 18 ++++++++++++++++++ src/lib.rs | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 src/chi.rs diff --git a/Cargo.toml b/Cargo.toml index 71cee0d..cd2e5da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "matchit" -version = "0.3.0" +version = "0.3.1" license = "MIT" authors = ["ibraheem "] edition = "2018" diff --git a/README.md b/README.md index e993137..0ec6915 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MatchIt -[![Documentation](https://img.shields.io/badge/docs-0.2.0-4d76ae?style=for-the-badge)](https://docs.rs/matchit/0.2.0) +[![Documentation](https://img.shields.io/badge/docs-0.3.1-4d76ae?style=for-the-badge)](https://docs.rs/matchit/0.3.1) [![Version](https://img.shields.io/crates/v/matchit?style=for-the-badge)](https://crates.io/crates/matchit) [![License](https://img.shields.io/crates/l/matchit?style=for-the-badge)](https://crates.io/crates/matchit) [![Actions](https://img.shields.io/github/workflow/status/ibraheemdev/matchit/Rust/master?style=for-the-badge)](https://github.com/ibraheemdev/matchit/actions) diff --git a/src/chi.rs b/src/chi.rs new file mode 100644 index 0000000..021bd69 --- /dev/null +++ b/src/chi.rs @@ -0,0 +1,18 @@ +use std::collections::HashMap; + +pub enum NodeType { + Static, + Regex, + Param, + CatchAll +} + +pub struct Node { + typ: NodeType, + label: u8, + tail: u8, + prefix: Vec, + regex: regex::Regex, + endpoints: HashMap, + children: [Vec>; 4] +} diff --git a/src/lib.rs b/src/lib.rs index adfefa5..fd8ba9d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ #![deny(rust_2018_idioms)] -//! [![Documentation](https://img.shields.io/badge/docs-0.2.0-4d76ae?style=for-the-badge)](https://docs.rs/matchit/0.2.0) +//! [![Documentation](https://img.shields.io/badge/docs-0.3.1-4d76ae?style=for-the-badge)](https://docs.rs/matchit/0.3.1) //! [![Version](https://img.shields.io/crates/v/matchit?style=for-the-badge)](https://crates.io/crates/matchit) //! [![License](https://img.shields.io/crates/l/matchit?style=for-the-badge)](https://crates.io/crates/matchit) //! [![Actions](https://img.shields.io/github/workflow/status/ibraheemdev/matchit/Rust/master?style=for-the-badge)](https://github.com/ibraheemdev/matchit/actions)