From bef0478e45bec0343b026367fec53bf6e3adc4e3 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Mon, 9 May 2022 17:52:13 +0900 Subject: [PATCH] Rename `suggestion` to `suggest` --- Cargo.lock | 4 ++-- Cargo.toml | 10 +++------- README.md | 14 ++++++++------ examples/simple.rs | 2 +- src/lib.rs | 2 +- src/main.rs | 2 +- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6a4700..750fc8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,8 +168,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] -name = "suggestion" -version = "0.3.4" +name = "suggest" +version = "0.4.0" dependencies = [ "clap", "lev_distance", diff --git a/Cargo.toml b/Cargo.toml index 48d053b..42b4fae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "suggestion" -version = "0.3.4" +name = "suggest" +version = "0.4.0" edition = "2021" authors = ["Ken Matsui <26405363+ken-matsui@users.noreply.github.com>"] description = "A minimal library & CLI tool to provide similar name suggestions like \"Did you mean?\"" @@ -8,12 +8,8 @@ license = "MIT" readme = "README.md" repository = "https://github.com/ken-matsui/suggest/" homepage = "https://github.com/ken-matsui/suggest#readme" -documentation = "https://docs.rs/suggestion" +documentation = "https://docs.rs/suggest" [dependencies] clap = { version = "3.1", features = ["derive"] } lev_distance = "0.1.1" - -[[bin]] -name = "suggest" -path = "src/main.rs" diff --git a/README.md b/README.md index fb77d0e..840b86e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# suggest [![crates.io version](https://img.shields.io/crates/v/suggestion.svg)](https://crates.io/crates/suggestion) [![crates.io downloads](https://img.shields.io/crates/d/suggestion.svg)](https://crates.io/crates/suggestion) +# suggest [![crates.io version](https://img.shields.io/crates/v/suggest.svg)](https://crates.io/crates/suggest) [![crates.io downloads](https://img.shields.io/crates/d/suggest.svg)](https://crates.io/crates/suggest) A minimal library & CLI tool to provide similar name suggestions like "Did you mean?" This library provides suggestion traits for all collection types in the standard library. @@ -6,6 +6,8 @@ A WebAssembly package is also supported. This library is intended to suggest a candidate from a list of unknown suggestions until runtime, in addition to the suggestion feature already available in [`clap`](https://github.com/clap-rs/clap#default-features). +> This crate was previously called [`suggestion`](https://crates.io/crates/suggestion) but renamed, and it'll be yanked. + ## Examples ### Simple case @@ -13,7 +15,7 @@ This library is intended to suggest a candidate from a list of unknown suggestio This example can be executed by the `cargo run --example simple` command. ```rust -use suggestion::Suggest; +use suggest::Suggest; fn main() { let input = "instakk"; @@ -39,7 +41,7 @@ Did you mean `install`? ### Specifying distance ```rust -use suggestion::Suggest; +use suggest::Suggest; fn main() { let input = "paoc"; @@ -77,7 +79,7 @@ Please let me know if anything is left out through issues or pull requests. * `HashMap` * `BTreeMap` -To suggest keys, use `suggestion::SuggestKey` trait. +To suggest keys, use `suggest::SuggestKey` trait. ### Sets @@ -95,7 +97,7 @@ To suggest keys, use `suggestion::SuggestKey` trait. ### Installation ```bash -cargo install suggestion +cargo install suggest ``` #### WebAssembly @@ -111,7 +113,7 @@ $ wapm install ken-matsui/suggest ```bash $ suggest --help -suggestion 0.3.1 +suggest 0.3.1 A minimal library & CLI tool to provide similar name suggestions like "Did you mean?" USAGE: diff --git a/examples/simple.rs b/examples/simple.rs index 4ff159b..5af0248 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,4 +1,4 @@ -use suggestion::Suggest; +use suggest::Suggest; fn main() { let input = "instakk"; diff --git a/src/lib.rs b/src/lib.rs index c85451b..af7641f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ //! //! # Example //! ``` -//! use suggestion::Suggest; +//! use suggest::Suggest; //! //! let input = "instakk"; //! diff --git a/src/main.rs b/src/main.rs index c217237..c5096ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use clap::Parser; -use suggestion::Suggest; +use suggest::Suggest; #[derive(Parser, Debug)] #[clap(version, about, long_about = None)]