diff --git a/README.md b/README.md index e69de29..f17b514 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,29 @@ +# suggestion + +This library Pprovides suggestion traits for all collection types in the standard library. + +## Example + +```rust +use suggestion::Suggest; + +fn main() { + let input = "instakk"; + + let list_commands = vec!["update", "install"]; + if list_commands.contains(&input) { + return; + } + + if let Some(sugg) = list_commands.suggest(input) { + println!("No command named `{}` found.", input); + println!("Did you mean `{}`?", sugg); + } +} +``` + +```shell +$ cargo run +No command named `instakk` found. +Did you mean `install`? +```