diff --git a/Cargo.toml b/Cargo.toml index b07c952..6781512 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trie-match" -version = "0.1.0" +version = "0.1.1" edition = "2021" rust-version = "1.60" authors = [ diff --git a/README.md b/README.md index f675e6a..c7c1b47 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ [![Build Status](https://github.com/daac-tools/trie-match/actions/workflows/rust.yml/badge.svg)](https://github.com/daac-tools/trie-match/actions) [![Slack](https://img.shields.io/badge/join-chat-brightgreen?logo=slack)](https://join.slack.com/t/daac-tools/shared_invite/zt-1pwwqbcz4-KxL95Nam9VinpPlzUpEGyA) -This macro speeds up Rust's `match` expression when it compares strings. +This macro speeds up Rust's `match` expression for comparing strings by using a +compact double-array data structure. ## Usage @@ -65,6 +66,7 @@ to achieve efficient state-to-state traversal, and the time complexity becomes The followings are different from the normal `match` expression: +* Only supports string comparison. * The wildcard is evaluated last. (The normal `match` expression does not match patterns after the wildcard.) * Pattern bindings are unavailable. diff --git a/src/lib.rs b/src/lib.rs index 7f7c7a4..7dd6d15 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ //! # `trie_match! {}` //! -//! This macro uses a compact double array trie for Rust's `match` expression to -//! speed up conditional branching by strings. +//! This macro speeds up Rust's `match` expression for comparing strings by using a compact +//! double-array data structure. //! //! ## Usage //! @@ -28,6 +28,7 @@ //! //! The followings are different from the normal `match` expression: //! +//! * Only supports string comparison. //! * The wildcard is evaluated last. (The normal `match` expression does not //! match patterns after the wildcard.) //! * Pattern bindings are unavailable.