From 17a824da00b63d11bbf8ac8020bfb12c74789a95 Mon Sep 17 00:00:00 2001 From: Riccardo Mazzarini Date: Tue, 12 Dec 2023 16:24:08 +0100 Subject: [PATCH] rename `package` to `norm` the `norm` crate was finally removed for squatting --- Cargo.toml | 7 ++----- README.md | 34 ++++------------------------------ 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a857774..8059662 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "norms" +name = "norm" version = "0.1.1" edition = "2021" authors = ["Riccardo Mazzarini "] description = "A collection of distance metrics on strings" -documentation = "https://docs.rs/norms" +documentation = "https://docs.rs/norm" repository = "https://github.com/nomad/norm" readme = "README.md" license = "MIT" @@ -16,9 +16,6 @@ exclude = ["/.github", "/fuzz", "CHANGELOG.md"] features = ["fzf-v1", "fzf-v2"] rustdoc-args = ["--cfg", "docsrs"] -[lib] -name = "norm" - [features] fzf-v1 = ["__any-metric"] fzf-v2 = ["__any-metric"] diff --git a/README.md b/README.md index 6a6afe1..b796f29 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # 📐 norm -[![Latest version]](https://crates.io/crates/norms) -[![Docs badge]](https://docs.rs/norms) +[![Latest version]](https://crates.io/crates/norm) +[![Docs badge]](https://docs.rs/norm) [![CI]](https://github.com/nomad/norm/actions) -[Latest version]: https://img.shields.io/crates/v/norms.svg -[Docs badge]: https://docs.rs/norms/badge.svg +[Latest version]: https://img.shields.io/crates/v/norm.svg +[Docs badge]: https://docs.rs/norm/badge.svg [CI]: https://github.com/nomad/norm/actions/workflows/ci.yml/badge.svg norm is a collection of different distance metrics on stings. This problem is @@ -71,30 +71,4 @@ assert_eq!(ranges.len(), 1); assert_eq!(ranges[0], 2..4); // The first "aa" in "Ulaanbaatar" ``` -## A note on the crate's naming scheme - -norm's `package.name` is `norms`, while its `lib.name` is `norm`. This is -because the package name has to be unique to be published to [crates.io], but -unfortunately `norm` is already taken by a crate squatter. -What this means is that you should import norm as `norms` in your `Cargo.toml`, -and `use` it as `norm` in your source code. - -For example: - -```toml -# Cargo.toml -[dependencies] -norms = { version = "0.1", features = ["fzf-v2"] } -``` - -```rust -// main.rs -use norm::fzf::FzfV2; - -fn main() { - println!("{:?}", FzfV2::new()); -} -``` - [bench]: https://github.com/noib3/fuzzy-benches -[crates.io]: https://crates.io