diff --git a/README.md b/README.md index f3ce355..8dd78e7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ alt="Common (CMN) logo" height="261" width="261" align="right" /> A Rust library for accessing a collection of mathematical and cryptographic constants -*Part of the [Mini Functions][0] family of libraries.* +*Part of the [Mini Functions][00] family of libraries.*
@@ -17,9 +17,9 @@ A Rust library for accessing a collection of mathematical and cryptographic cons ![Common (CMN) Banner][banner] -[![Made With Rust][made-with-rust-badge]][14] [![Crates.io][crates-badge]][8] [![Lib.rs][libs-badge]][10] [![Docs.rs][docs-badge]][9] [![License][license-badge]][2] [![Codecov][codecov-badge]][15] +[![Made With Rust][made-with-rust-badge]][13] [![Crates.io][crates-badge]][08] [![Lib.rs][libs-badge]][10] [![Docs.rs][docs-badge]][09] [![License][license-badge]][02] [![Codecov][codecov-badge]][14] -• [Website][1] • [Documentation][9] • [Report Bug][4] • [Request Feature][4] • [Contributing Guidelines][5] +• [Website][01] • [Documentation][09] • [Report Bug][04] • [Request Feature][04] • [Contributing Guidelines][05]
@@ -37,9 +37,9 @@ The `Common (CMN)` uses the `serde` crate to serialize and deserialize the data. The library has three modules: -- **Macros**: This module contains functions for generating macros that can be used to access the constants. -- **Constants**: This module contains the Constants structure, which provides a collection of constant values that are used throughout the library. -- **Words**: This module contains the Words structure, which provides a collection of words that are used throughout the library. +- **Macros**: This module contains functions for generating macros that can be used to access the constants and words. +- **Constants**: This module contains the `Constants` structure, which provides a collection of constant values that are used throughout the library. +- **Words**: This module contains the `Words` structure, which provides a collection of words that are used throughout the library. ### Mathematical and Cryptographic Constants @@ -47,22 +47,34 @@ The following table lists the most important mathematical and cryptographic cons | Constants | Description | Example | | --- | --- | --- | -| AVOGADRO | Avogadro's constant is the number of atoms or molecules in one mole of a substance. | The number of atoms in 12 grams of carbon-12 is 6.02214076 × 10^23. This can be used to calculate the number of atoms or molecules in a given sample. | -| BOLTZMANN | Boltzmann's constant is the physical constant relating the temperature of a system to the average kinetic energy of its constituent particles. | The kinetic energy of an atom at room temperature is about 2.0 × 10^-21 joules. This can be used to calculate the temperature of a system, or to calculate the average kinetic energy of its particles. | -| EULER | Euler's constant is a mathematical constant approximately equal to 2.71828. | The sum of the infinite series 1 + 1/2 + 1/3 + ... is equal to Euler's constant, e. This can be used to calculate the sum of an infinite series, or to calculate the logarithm of a number. | -| GAMMA | The gamma constant is a mathematical constant approximately equal to 0.57721. | The gamma function of 2 is equal to 1. This can be used to calculate the gamma function of a number, or to calculate the factorial of a number. | +| APERY | Apéry's constant, which is the sum of the reciprocals of the positive cubes. `ζ(3) ≈ 1.2020569032` | Used in various mathematical calculations and series approximations. | +| AVOGADRO | Avogadro's constant is the number of atoms or molecules in one mole of a substance. `N_A ≈ 6.02214076 x 10^23 mol^-1` | The number of atoms in 12 grams of carbon-12 is 6.02214076 × 10^23. This can be used to calculate the number of atoms or molecules in a given sample. | +| BOLTZMANN | Boltzmann's constant is the physical constant relating the temperature of a system to the average kinetic energy of its constituent particles. `k_B ≈ 1.380648 x 10^-23 J K^-1` | The kinetic energy of an atom at room temperature is about 2.0 × 10^-21 joules. This can be used to calculate the temperature of a system, or to calculate the average kinetic energy of its particles. | +| CATALAN | Catalan's constant, which is the sum of the alternating harmonic series. `C ≈ 0.915965594177219` | Used in various mathematical calculations and series approximations. | +| COULOMB | Coulomb's constant, which is the proportionality constant in Coulomb's law. `k_e ≈ 8.9875517923` x 10^9 N m^2 C^-2 | Used in calculations related to electrostatic forces and electric fields. | +| EULER | Euler's constant is a mathematical constant approximately equal to 2.71828. `e ≈ 2.7182818284590452353602874713527` | The sum of the infinite series 1 + 1/2 + 1/3 + ... is equal to Euler's constant, e. This can be used to calculate the sum of an infinite series, or to calculate the logarithm of a number. | +| FARADAY | Faraday constant, which represents the amount of electric charge carried by one mole of electrons. `F ≈ 96485.33212 C mol^-1` | Used in calculations related to electrochemistry and electrolysis. | +| GAMMA | The gamma constant is a mathematical constant approximately equal to 0.57721. `γ ≈ 0.5772156649015329` | The gamma function of 2 is equal to 1. This can be used to calculate the gamma function of a number, or to calculate the factorial of a number. | +| GAS_CONSTANT | The gas constant, which relates the energy scale to the temperature scale in the ideal gas law. `R ≈ 8.314462618 J mol^-1 K^-1` | Used in calculations related to the behavior of gases and thermodynamics. | +| GLAISHER_KINKELIN | Glaisher-Kinkelin constant, which arises in the asymptotic expansion of the Barnes G-function. `A ≈ 1.2824271291` | Used in various mathematical calculations and series approximations. | +| GRAVITATIONAL_CONSTANT | The gravitational constant, which is the proportionality constant in Newton's law of universal gravitation. `G ≈ 6.67430 x 10^-11 m^3 kg^-1 s^-2` | Used in calculations related to gravitational forces and celestial mechanics. | | HASH_ALGORITHM | The hash algorithm used to generate the hash. The default is Blake3. | The hash of the string "Hello, world!" is 5eb63bbbe01eeed093cb22bb8f5acdc32790160b123138d53f2173b8d3dc3eee. This can be used to verify the integrity of data, or to create a unique identifier for a file. | -| HASH_COST | The cost of the hash. | The hash cost of Blake3 is 2^128. This can be used to determine how secure a hash algorithm is. | +| HASH_COST | The cost of the hash. | The hash cost of Blake3 is `2^128`. This can be used to determine how secure a hash algorithm is. | | HASH_LENGTH | The length of the hash. | The hash length of Blake3 is 32 bytes. This can be used to determine how much space is required to store the hash output. | -| PHI | The golden ratio is a number approximately equal to 1.618033988749895. | The golden ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | -| Pi (π) | Pi is the ratio of a circle's circumference to its diameter. | The circumference of a circle with a radius of 1 is equal to pi. This can be used to calculate the circumference, area, and volume of circles, spheres, and other geometric shapes. | -| PLANCK | Planck's constant is a physical constant that is approximately equal to 6.62607015 × 10^−34 joule seconds. | The energy of a photon of light with a wavelength of 500 nanometers is equal to Planck's constant multiplied by the frequency of the light. This can be used to calculate the energy of photons and other elementary particles. | -| SILVER_RATIO | The silver ratio is a number approximately equal to 1.414213562373095. | The silver ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | -| SPECIAL_CHARS | A list of special characters. | The special characters are: !@#$%^&*()_+-={}[]|\:;"'<>,.? | -| SQRT2 | The square root of 2 is a number approximately equal to 1.414213562373095. | The area of a circle with a radius of 1 is equal to the square root of 2. This can be used to calculate the area and volume of circles, spheres, and other geometric shapes. | -| SQRT3 | The square root of 3 is a number approximately equal to 1.732050807568877. | The area of a circle with a radius of 1 is equal to the square root of 3. This can be used to calculate the area and volume of circles -| SQRT5 | The square root of 5 is a number approximately equal to 2.23606797749979. | The area of a circle with a radius of 1 is equal to the square root of 5. | -| TAU | Tau is a number approximately equal to 6.283185307179586. | The circumference of a circle with a radius of 1 is equal to tau. | +| KHINCHIN | Khinchin's constant, which appears in the theory of continued fractions. `K ≈ 2.6854520010` | Used in various mathematical calculations and series approximations. | +| PHI | The golden ratio is a number approximately equal to 1.618033988749895. `φ = (1 + √5) / 2 ≈ 1.6180339887498948482045868343656` | The golden ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | +| Pi (π) | Pi is the ratio of a circle's circumference to its diameter. `π ≈ 3.14159265358979323846264338327950288` | The circumference of a circle with a radius of 1 is equal to pi. This can be used to calculate the circumference, area, and volume of circles, spheres, and other geometric shapes. | +| PLANCK | Planck's constant, which relates the energy of a photon to its frequency. `h ≈ 6.62607015 x 10^-34 J s` | The energy of a photon of light with a wavelength of 500 nanometers is equal to Planck's constant multiplied by the frequency of the light. This can be used to calculate the energy of photons and other elementary particles. | +| PLANCK_REDUCED | Planck's reduced constant, which is Planck's constant divided by 2π. `ħ = h / (2π) ≈ 1.054571817 x 10^-34 J s` | Used in quantum mechanics and related calculations. | +| SILVER_RATIO | The silver ratio is one of the silver means. `δ_s = 1 + √2 ≈ 2.4142135623730950488016887242097` | The silver ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | +| SPEED_OF_LIGHT | The speed of light in vacuum. `c ≈ 299792458 m s^-1` | Used in calculations related to relativity and electromagnetic phenomena. | +| SPECIAL_CHARS | A set of special characters. | The special characters are: !@#$%^&*()_+-={}[]|\:;"'<>,.?` | +| SQRT2 | The square root of 2. `√2 ≈ 1.4142135623730950488016887242097` | The area of a circle with a radius of 1 is equal to the square root of 2. This can be used to calculate the area and volume of circles, spheres, and other geometric shapes. | +| SQRT3 | The square root of 3. `√3 ≈ 1.7320508075688772935274463415059` | The area of a circle with a radius of 1 is equal to the square root of 3. This can be used to calculate the area and volume of circles. | +| SQRT5 | The square root of 5. `√5 ≈ 2.23606797749979` | The area of a circle with a radius of 1 is equal to the square root of 5. | +| TAU | The circle constant, which is the ratio of a circle's circumference to its radius. `τ = 2π ≈ 6.28318530717958647692528676655900577` | The circumference of a circle with a radius of 1 is equal to tau. | +| VACUUM_PERMEABILITY | The vacuum permeability, which relates magnetic induction to magnetic field strength. `μ_0 ≈ 1.25663706212 x 10^-6 N A^-2` | Used in calculations related to electromagnetism and magnetic fields. | +| VACUUM_PERMITTIVITY | The vacuum permittivity, which relates electric displacement to electric field strength. `ε_0 ≈ 8.8541878128 x 10^-12 F m^-1` | Used in calculations related to electromagnetism and electric fields. | ## Getting Started 🚀 @@ -70,7 +82,7 @@ It takes just a few minutes to get up and running with `Common (CMN)`. ### Installation -To install `Common (CMN)`, you need to have the Rust toolchain installed on your machine. You can install the Rust toolchain by following the instructions on the [Rust website][14]. +To install `Common (CMN)`, you need to have the Rust toolchain installed on your machine. You can install the Rust toolchain by following the instructions on the [Rust website][13]. Once you have the Rust toolchain installed, you can install `Common (CMN)` using the following command: @@ -78,62 +90,19 @@ Once you have the Rust toolchain installed, you can install `Common (CMN)` using cargo install cmn ``` -You can then run the help command to see the available options: - -```shell -cmn --help -``` - ### Requirements -The minimum supported Rust toolchain version is currently Rust **1.69.0** or later (stable). It is recommended that you install the latest stable version of Rust. +The minimum supported Rust toolchain version is currently Rust **1.60** or later (stable). It is recommended that you install the latest stable version of Rust. ### Platform support -`Common (CMN)` is supported and tested on the following platforms: +`cmn` supports a variety of CPU architectures. It is supported and tested on MacOS, Linux, and Windows. -#### Tier 1 platforms 🏆 - -| Operating System | Target | Description | -| --- | --- | --- | -| Linux | aarch64-unknown-linux-gnu | 64-bit Linux systems on ARM architecture | -| Linux | i686-unknown-linux-gnu | 32-bit Linux (kernel 3.2+, glibc 2.17+) | -| Linux | x86_64-unknown-linux-gnu | 64-bit Linux (kernel 2.6.32+, glibc 2.11+) | -| macOS | x86_64-apple-darwin | 64-bit macOS (10.7 Lion or later) | -| Windows | i686-pc-windows-gnu | 32-bit Windows (7 or later) | -| Windows | i686-pc-windows-msvc | 32-bit Windows (7 or later) | -| Windows | x86_64-pc-windows-gnu | 64-bit Windows (7 or later) | -| Windows | x86_64-pc-windows-msvc | 64-bit Windows (7 or later) | - -#### Tier 2 platforms 🥈 - -| Operating System | Target | Description | -| --- | --- | --- | -| 64-bit Linux | x86_64-unknown-linux-musl | 64-bit Linux (kernel 2.6.32+, musl libc) | -| ARM64 Linux | aarch64-unknown-linux-musl | 64-bit Linux systems on ARM architecture | -| ARM64 macOS | aarch64-apple-darwin | 64-bit macOS on Apple Silicon | -| ARM64 Windows | aarch64-pc-windows-msvc | 64-bit Windows (aarch64-pc-windows-msvc) | -| ARMv6 Linux | arm-unknown-linux-gnueabi | ARMv6 Linux (kernel 3.2, glibc 2.17) | -| ARMv6 Linux, hardfloat | arm-unknown-linux-gnueabihf | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17) | -| ARMv7 Linux, hardfloat | armv7-unknown-linux-gnueabihf | ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17) | -| FreeBSD | x86_64-unknown-freebsd | 64-bit FreeBSD on x86-64 | -| MIPS (LE) Linux | mipsel-unknown-linux-gnu | MIPSel Linux (kernel 2.6.32+, glibc 2.11+) | -| MIPS Linux | mips-unknown-linux-gnu | MIPS Linux (kernel 2.6.32+, glibc 2.11+) | -| MIPS64 (LE) Linux | mips64el-unknown-linux-gnuabi64 | MIPS64el Linux (kernel 2.6.32+, glibc 2.11+) | -| MIPS64 Linux | mips64-unknown-linux-gnuabi64 | MIPS64 Linux (kernel 2.6.32+, glibc 2.11+) | -| NetBSD | x86_64-unknown-netbsd | 64-bit NetBSD on x86-64 | -| PowerPC Linux | powerpc-unknown-linux-gnu | PowerPC Linux (kernel 3.2, glibc 2.17) | -| PPC64 Linux | powerpc64-unknown-linux-gnu | PowerPC64 Linux (kernel 3.2, glibc 2.17) | -| PPC64LE Linux | powerpc64le-unknown-linux-gnu | PowerPC64le Linux (kernel 3.2, glibc 2.17) | -| RISC-V Linux | riscv64gc-unknown-linux-gnu | RISC-V Linux (kernel 3.2, glibc 2.17) | -| S390x Linux | s390x-unknown-linux-gnu | s390x Linux (kernel 3.2, glibc 2.17) | - -The [GitHub Actions][11] shows the platforms in which the `Common (CMN)` library tests are run. ### Documentation -> ℹ️ **Info:** Please check out our [website][1] for more information. -You can find our documentation on [docs.rs][9], [lib.rs][10] and [crates.io][8]. +> ℹ️ **Info:** Please check out our [website][01] for more information. +You can find our documentation on [docs.rs][09], [lib.rs][10] and [crates.io][08]. ## Usage 📖 @@ -163,45 +132,44 @@ cargo run --example cmn ## Semantic Versioning Policy 🚥 -For transparency into our release cycle and in striving to maintain backward compatibility, `Common (CMN)` follows [semantic versioning][7]. +For transparency into our release cycle and in striving to maintain backward compatibility, `Common (CMN)` follows [semantic versioning][07]. ## License 📝 -The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0). +`Common (CMN)`is distributed under the terms of both the MIT license and the +Apache License (Version 2.0). -- [Apache License, Version 2.0][2] -- [MIT license][3] +See [LICENSE-APACHE][02] and [LICENSE-MIT][03] for details. ## Contribution 🤝 -We welcome all people who want to contribute. Please see the [contributing instructions][5] for more information. +We welcome all people who want to contribute. Please see the [contributing instructions][05] for more information. -Contributions in any form (issues, pull requests, etc.) to this project must adhere to the [Rust's Code of Conduct][12]. +Contributions in any form (issues, pull requests, etc.) to this project must adhere to the [Rust's Code of Conduct][11]. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. ## Acknowledgements 💙 -A big thank you to all the awesome contributors of the [Common (CMN) Library][6] for their help and support. +A big thank you to all the awesome contributors of the [Common (CMN) Library][06] for their help and support. -A special thank you goes to the [Rust Reddit][13] community for providing a lot of useful suggestions on how to improve this project. +A special thank you goes to the [Rust Reddit][12] community for providing a lot of useful suggestions on how to improve this project. -[0]: https://cmnlib.com/ "MiniFunctions" -[1]: https://cmnlib.one "Common (CMN) Library Website" -[2]: https://opensource.org/license/apache-2-0/ "Apache License, Version 2.0" -[3]: https://opensource.org/licenses/MIT "MIT license" -[4]: https://github.com/sebastienrousseau/cmn/issues "Issues" -[5]: https://github.com/sebastienrousseau/cmn/blob/main/CONTRIBUTING.md "Contributing Instructions" -[6]: https://github.com/sebastienrousseau/cmn/graphs/contributors "Contributors" -[7]: http://semver.org/ "Semantic Versioning" -[8]: https://crates.io/crates/cmn "Crates.io" -[9]: https://docs.rs/cmn "Docs.rs" +[00]: https://cmnlib.com/ "MiniFunctions" +[01]: https://cmnlib.one "Common (CMN) Library Website" +[02]: https://opensource.org/license/apache-2-0/ "Apache License, Version 2.0" +[03]: https://opensource.org/licenses/MIT "MIT license" +[04]: https://github.com/sebastienrousseau/cmn/issues "Issues" +[05]: https://github.com/sebastienrousseau/cmn/blob/main/CONTRIBUTING.md "Contributing Instructions" +[06]: https://github.com/sebastienrousseau/cmn/graphs/contributors "Contributors" +[07]: http://semver.org/ "Semantic Versioning" +[08]: https://crates.io/crates/cmn "Crates.io" +[09]: https://docs.rs/cmn "Docs.rs" [10]: https://lib.rs/crates/cmn "Lib.rs" -[11]: https://github.com/sebastienrousseau/cmn/actions "GitHub Actions" -[12]: https://www.rust-lang.org/policies/code-of-conduct "Rust's Code of Conduct" -[13]: https://reddit.com/r/rust "Rust Reddit" -[14]: https://www.rust-lang.org "The Rust Programming Language" -[15]: https://codecov.io/gh/sebastienrousseau/cmn "Codecov" +[11]: https://www.rust-lang.org/policies/code-of-conduct "Rust's Code of Conduct" +[12]: https://reddit.com/r/rust "Rust Reddit" +[13]: https://www.rust-lang.org "The Rust Programming Language" +[14]: https://codecov.io/gh/sebastienrousseau/cmn "Codecov" [banner]: https://kura.pro/cmn/images/titles/title-cmn.svg 'Common (CMN) banner' [codecov-badge]: https://img.shields.io/codecov/c/github/sebastienrousseau/cmn?style=for-the-badge&token=0FZQGHLMOP 'Codecov' diff --git a/benches/criterion.rs b/benches/criterion.rs index 7ae9427..0f30e3a 100644 --- a/benches/criterion.rs +++ b/benches/criterion.rs @@ -40,4 +40,4 @@ fn bench_words(c: &mut Criterion) { } criterion_group!(benches, bench_cmn, bench_words); -criterion_main!(benches); \ No newline at end of file +criterion_main!(benches); diff --git a/src/lib.rs b/src/lib.rs index b227896..05bb732 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,26 +38,37 @@ //! The following table lists the most important mathematical and cryptographic constants available in the `Common (CMN)` library: //! //!| Constants | Description | Example | -//!| --- | --- | --- | -//!| AVOGADRO | Avogadro's constant is the number of atoms or molecules in one mole of a substance. | The number of atoms in 12 grams of carbon-12 is 6.02214076 × 10^23. This can be used to calculate the number of atoms or molecules in a given sample. | -//!| BOLTZMANN | Boltzmann's constant is the physical constant relating the temperature of a system to the average kinetic energy of its constituent particles. | The kinetic energy of an atom at room temperature is about 2.0 × 10^-21 joules. This can be used to calculate the temperature of a system, or to calculate the average kinetic energy of its particles. | -//!| EULER | Euler's constant is a mathematical constant approximately equal to 2.71828. | The sum of the infinite series 1 + 1/2 + 1/3 + ... is equal to Euler's constant, e. This can be used to calculate the sum of an infinite series, or to calculate the logarithm of a number. | -//!| GAMMA | The gamma constant is a mathematical constant approximately equal to 0.57721. | The gamma function of 2 is equal to 1. This can be used to calculate the gamma function of a number, or to calculate the factorial of a number. | +//!| -- | -- | -- | +//!| APERY | Apéry's constant, is the sum of the reciprocals of the positive cubes.
`ζ(3) ≈ 1.2020569032` | Used in various mathematical calculations and series approximations. | +//!| AVOGADRO | Avogadro's constant is the number of atoms or molecules in one mole of a substance.
`N_A ≈ 6.02214076 x 10^23 mol^-1` | The number of atoms in 12 grams of carbon-12 is 6.02214076 × 10^23. This can be used to calculate the number of atoms or molecules in a given sample. | +//!| BOLTZMANN | Boltzmann's constant is the physical constant relating the temperature of a system to the average kinetic energy of its constituent particles.
`k_B ≈ 1.380648 x 10^-23 J K^-1` | The kinetic energy of an atom at room temperature is about 2.0 × 10^-21 joules. This can be used to calculate the temperature of a system, or to calculate the average kinetic energy of its particles. | +//!| CATALAN | Catalan's constant, is the sum of the alternating harmonic series.
`C ≈ 0.915965594177219` | Used in various mathematical calculations and series approximations. | +//!| COULOMB | Coulomb's constant, is the proportionality constant in Coulomb's law.
`k_e ≈ 8.9875517923` x 10^9 N m^2 C^-2 | Used in calculations related to electrostatic forces and electric fields. | +//!| EULER | Euler's constant is a mathematical constant approximately equal to 2.71828.
`e ≈ 2.7182818284590452353602874713527` | The sum of the infinite series 1 + 1/2 + 1/3 + ... is equal to Euler's constant, e. This can be used to calculate the sum of an infinite series, or to calculate the logarithm of a number. | +//!| FARADAY | Faraday constant, which represents the amount of electric charge carried by one mole of electrons.
`F ≈ 96485.33212 C mol^-1` | Used in calculations related to electrochemistry and electrolysis. | +//!| GAMMA | The gamma constant is a mathematical constant approximately equal to 0.57721.
`γ ≈ 0.5772156649015329` | The gamma function of 2 is equal to 1. This can be used to calculate the gamma function of a number, or to calculate the factorial of a number. | +//!| GAS_CONSTANT | The gas constant, which relates the energy scale to the temperature scale in the ideal gas law.
`R ≈ 8.314462618 J mol^-1 K^-1` | Used in calculations related to the behavior of gases and thermodynamics. | +//!| GLAISHER_KINKELIN | Glaisher-Kinkelin constant, which arises in the asymptotic expansion of the Barnes G-function.
`A ≈ 1.2824271291` | Used in various mathematical calculations and series approximations. | +//!| GRAVITATIONAL_CONSTANT | The gravitational constant, is the proportionality constant in Newton's law of universal gravitation.
`G ≈ 6.67430 x 10^-11 m^3 kg^-1 s^-2` | Used in calculations related to gravitational forces and celestial mechanics. | //!| HASH_ALGORITHM | The hash algorithm used to generate the hash. The default is Blake3. | The hash of the string "Hello, world!" is 5eb63bbbe01eeed093cb22bb8f5acdc32790160b123138d53f2173b8d3dc3eee. This can be used to verify the integrity of data, or to create a unique identifier for a file. | -//!| HASH_COST | The cost of the hash. | The hash cost of Blake3 is 2^128. This can be used to determine how secure a hash algorithm is. | +//!| HASH_COST | The cost of the hash. | The hash cost of Blake3 is
`2^128`. This can be used to determine how secure a hash algorithm is. | //!| HASH_LENGTH | The length of the hash. | The hash length of Blake3 is 32 bytes. This can be used to determine how much space is required to store the hash output. | -//!| PHI | The golden ratio is a number approximately equal to 1.618033988749895. | The golden ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | -//!| PI | Pi is the ratio of a circle's circumference to its diameter. | The circumference of a circle with a radius of 1 is equal to pi. This can be used to calculate the circumference, area, and volume of circles, spheres, and other geometric shapes. | -//!| PLANCK | Planck's constant is a physical constant that is approximately equal to 6.62607015 × 10^−34 joule seconds. | The energy of a photon of light with a wavelength of 500 nanometers is equal to Planck's constant multiplied by the frequency of the light. This can be used to calculate the energy of photons and other elementary particles. | -//!| SILVER_RATIO | The silver ratio is a number approximately equal to 1.414213562373095. | The silver ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | -//!| SPECIAL_CHARS | A list of special characters. | The special characters are: !@#$%^&*()_+-={}[]|\:;"'<>,.? | -//!| SQRT2 | The square root of 2 is a number approximately equal to 1.414213562373095. | The area of a circle with a radius of 1 is equal to the square root of 2. This can be used to calculate the area and volume of circles, spheres, and other geometric shapes. | -//!| SQRT3 | The square root of 3 is a number approximately equal to 1.732050807568877. | The area of a circle with a radius of 1 is equal to the square root of 3. This can be used to calculate the area and volume of circles -//!| SQRT5 | The square root of 5 is a number approximately equal to 2.23606797749979. | The area of a circle with a radius of 1 is equal to the square root of 5. | -//!| TAU | Tau is a number approximately equal to 6.283185307179586. | The circumference of a circle with a radius of 1 is equal to tau. | -//! -//! The following table lists the dictionaries available in the Common -//! library. +//!| KHINCHIN | Khinchin's constant, which appears in the theory of continued fractions.
`K ≈ 2.6854520010` | Used in various mathematical calculations and series approximations. | +//!| PHI | The golden ratio is a number approximately equal to 1.618033988749895.
`φ = (1 + √5) / 2 ≈ 1.6180339887498948482045868343656` | The golden ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | +//!| Pi (π) | Pi is the ratio of a circle's circumference to its diameter.
`π ≈ 3.14159265358979323846264338327950288` | The circumference of a circle with a radius of 1 is equal to pi. This can be used to calculate the circumference, area, and volume of circles, spheres, and other geometric shapes. | +//!| PLANCK | Planck's constant, which relates the energy of a photon to its frequency.
`h ≈ 6.62607015 x 10^-34 J s` | The energy of a photon of light with a wavelength of 500 nanometers is equal to Planck's constant multiplied by the frequency of the light. This can be used to calculate the energy of photons and other elementary particles. | +//!| PLANCK_REDUCED | Planck's reduced constant, is Planck's constant divided by 2π.
`ħ = h / (2π) ≈ 1.054571817 x 10^-34 J s` | Used in quantum mechanics and related calculations. | +//!| SILVER_RATIO | The silver ratio is one of the silver means.
`δ_s = 1 + √2 ≈ 2.4142135623730950488016887242097` | The silver ratio can be used to create a symmetrical design, or a design that is pleasing to the eye. | +//!| SPEED_OF_LIGHT | The speed of light in vacuum.
`c ≈ 299792458 m s^-1` | Used in calculations related to relativity and electromagnetic phenomena. | +//!| SPECIAL_CHARS | A set of special characters. | The special characters are: !@#$%^&*()_+-={}[]|\:;"'<>,.?` | +//!| SQRT2 | The square root of 2.
`√2 ≈ 1.4142135623730950488016887242097` | The area of a circle with a radius of 1 is equal to the square root of 2. This can be used to calculate the area and volume of circles, spheres, and other geometric shapes. | +//!| SQRT3 | The square root of 3.
`√3 ≈ 1.7320508075688772935274463415059` | The area of a circle with a radius of 1 is equal to the square root of 3. This can be used to calculate the area and volume of circles. | +//!| SQRT5 | The square root of 5.
`√5 ≈ 2.23606797749979` | The area of a circle with a radius of 1 is equal to the square root of 5. | +//!| TAU | The circle constant, is the ratio of a circle's circumference to its radius.
`τ = 2π ≈ 6.28318530717958647692528676655900577` | The circumference of a circle with a radius of 1 is equal to tau. | +//!| VACUUM_PERMEABILITY | The vacuum permeability, which relates magnetic induction to magnetic field strength.
`μ_0 ≈ 1.25663706212 x 10^-6 N A^-2` | Used in calculations related to electromagnetism and magnetic fields. | +//!| VACUUM_PERMITTIVITY | The vacuum permittivity, which relates electric displacement to electric field strength.
`ε_0 ≈ 8.8541878128 x 10^-12 F m^-1` | Used in calculations related to electromagnetism and electric fields. | +//! +//! The following table lists the dictionaries available in the Common library. //! //!| Words | Description | //!| --- | --- | @@ -171,7 +182,9 @@ impl Common { .as_array() .expect("Words data is not an array") .iter() - .map(|word_value| word_value.as_str().unwrap().to_string()) + .map(|word_value| { + word_value.as_str().unwrap().to_string() + }) .collect::>() }) .unwrap_or_default(); // Add this line @@ -180,11 +193,20 @@ impl Common { words: HashSet::from_iter(words_data), } } - /// Parses a string of JSON data and returns a new instance of the - /// `Common` structure. + /// Parses a string of JSON data and returns a new instance of the `Common` structure. pub fn parse(input: &str) -> Result { - match serde_json::from_str(input) { - Ok(common) => Ok(common), + match serde_json::from_str::(input) { + Ok(common) => { + if common.fields.is_null() + || common.fields.is_object() + && common.fields.as_object().unwrap().is_empty() + { + // If the `fields` object is null or empty, return the default `Common` instance + Ok(Common::default()) + } else { + Ok(common) + } + } Err(e) => { // Handle the JSON parsing error match e.classify() { diff --git a/src/macros.rs b/src/macros.rs index ed7ff54..ecd2ff0 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -81,6 +81,18 @@ macro_rules! cmn_join { }}; } +/// This macro creates a new map of the given key-value pairs. +#[macro_export] +macro_rules! cmn_map { + ($($key:expr => $value:expr),*) => {{ + let mut map = ::std::collections::HashMap::new(); + $( + map.insert($key, $value); + )* + map + }}; +} + /// This macro finds the maximum value of the given values. #[macro_export] macro_rules! cmn_max { @@ -135,6 +147,14 @@ macro_rules! cmn_split { }}; } +/// This macro converts the given string to a number. +#[macro_export] +macro_rules! cmn_to_num { + ($s:expr) => { + $s.parse::().unwrap_or(0.0) + }; +} + /// This macro creates a new vector with the given elements. #[macro_export] macro_rules! cmn_vec { diff --git a/src/words.rs b/src/words.rs index b12d3fb..b197e7d 100644 --- a/src/words.rs +++ b/src/words.rs @@ -41,7 +41,8 @@ impl Words { /// This method provides access to the words as a sorted vector. It is useful for operations /// that may require ordered data, like displaying words in a user interface. pub fn words_list(&self) -> Vec { - let mut words_vec: Vec = self.words.iter().cloned().collect(); + let mut words_vec: Vec = + self.words.iter().cloned().collect(); words_vec.sort(); words_vec } @@ -82,16 +83,14 @@ impl Default for Words { /// This method is automatically called when creating a new instance of `Words` /// using `Words::default()`. fn default() -> Self { - let mut sorted_words: Vec = WORD_LIST - .iter() - .map(|&word| word.to_owned()) - .collect(); - + let mut sorted_words: Vec<&str> = WORD_LIST.to_vec(); sorted_words.sort_unstable(); - sorted_words.dedup(); Words { - words: sorted_words.into_iter().collect(), + words: sorted_words + .into_iter() + .map(|s| s.to_owned()) + .collect(), } } } @@ -102,243 +101,243 @@ pub const WORD_LIST: &[&str] = &[ "abrupt", "absent", "absorb", "absurd", "abuse", "accent", "accept", "access", "accord", "accuse", "ace", "ache", "aching", "acid", "acidic", "acorn", "acre", "across", "act", "action", - "active", "actor", "actual", "acute", "adapt", "add", "added", - "addict", "adept", "adhere", "adjust", "admire", "admit", "adam", - "advert", "aerial", "afar", "affair", "affect", "afford", "afield", - "afghan", "alaska", "alice", "allah", "amazon", "andrew", "anglo", - "afloat", "afraid", "afresh", "after", "again", "age", "agency", - "agenda", "agent", "aghast", "agile", "ago", "agony", "agree", - "agreed", "ahead", "aid", "aide", "aim", "air", "airman", "airy", - "akin", "alarm", "albeit", "album", "alert", "alibi", "alien", - "alight", "align", "alike", "alive", "alkali", "all", "alley", - "allied", "allow", "alloy", "ally", "almond", "almost", "aloft", - "alone", "along", "aloof", "aloud", "alpha", "alpine", "also", - "altar", "alter", "always", "amaze", "amber", "ambush", "amen", - "amend", "amid", "amidst", "amiss", "among", "amount", "ample", - "amuse", "anchor", "and", "anew", "angel", "anger", "angle", - "angola", "antony", "adobe", "adopt", "adrift", "adult", "adverb", - "angry", "animal", "ankle", "annoy", "annual", "answer", "anthem", - "anti", "any", "anyhow", "anyway", "apart", "apathy", "apex", - "apiece", "appeal", "appear", "apple", "apply", "apron", "arcade", - "april", "arab", "arctic", "athens", "austin", "bach", "baltic", - "arcane", "arch", "ardent", "are", "area", "argue", "arid", + "active", "actor", "actual", "acute", "adam", "adapt", "add", + "added", "addict", "adept", "adhere", "adjust", "admire", "admit", + "adobe", "adopt", "adrift", "adult", "adverb", "advert", "aerial", + "afar", "affair", "affect", "afford", "afghan", "afield", "afloat", + "afraid", "afresh", "after", "again", "age", "agency", "agenda", + "agent", "aghast", "agile", "ago", "agony", "agree", "agreed", + "ahead", "aid", "aide", "aim", "air", "airman", "airy", "akin", + "alarm", "alaska", "albeit", "album", "alert", "alibi", "alice", + "alien", "alight", "align", "alike", "alive", "alkali", "all", + "allah", "alley", "allied", "allow", "alloy", "ally", "almond", + "almost", "aloft", "alone", "along", "aloof", "aloud", "alpha", + "alpine", "also", "altar", "alter", "always", "amaze", "amazon", + "amber", "ambush", "amen", "amend", "amid", "amidst", "amiss", + "among", "amount", "ample", "amuse", "anchor", "and", "andrew", + "anew", "angel", "anger", "angle", "anglo", "angola", "angry", + "animal", "ankle", "annoy", "annual", "answer", "anthem", "anti", + "antony", "any", "anyhow", "anyway", "apart", "apathy", "apex", + "apiece", "appeal", "appear", "apple", "apply", "april", "apron", + "arab", "arcade", "arcane", "arch", "arctic", "ardent", "are", + "area", "argue", "arid", "arise", "arm", "armful", "armpit", "army", "aroma", "around", "arouse", "array", "arrest", "arrive", "arrow", "arson", "art", "artery", "artful", "artist", "ascent", "ashen", "ashore", "aside", "ask", "asleep", "aspect", "assay", "assent", "assert", "assess", "asset", "assign", "assist", - "assume", "assure", "asthma", "astute", "asylum", "ate", "atlas", - "atom", "atomic", "attach", "attack", "attain", "attend", "attic", - "auburn", "audio", "audit", "august", "aunt", "auntie", "aura", - "author", "auto", "autumn", "avail", "avenge", "avenue", "avert", - "avid", "avoid", "await", "awake", "awaken", "award", "aware", - "awash", "away", "awful", "awhile", "axes", "axiom", "axis", - "axle", "aye", "babe", "baby", "back", "backup", "bacon", "bad", - "badge", "badly", "bag", "baggy", "bail", "bait", "bake", "baker", - "bakery", "bald", "ball", "ballad", "ballet", "ballot", "bamboo", - "ban", "banal", "banana", "band", "bang", "bank", "bar", "barber", - "bare", "barely", "barge", "bark", "barley", "barn", "baron", - "barrel", "barren", "basalt", "base", "basic", "basil", "basin", - "basis", "basket", "bass", "bat", "batch", "bath", "baton", - "basque", "berlin", "bible", "arise", "arm", "armful", "armpit", - "battle", "bay", "beach", "beacon", "beak", "beam", "bean", "bear", - "beard", "beast", "beat", "beauty", "become", "bed", "beech", - "beef", "beefy", "beep", "beer", "beet", "beetle", "before", - "beggar", "begin", "behalf", "behave", "behind", "beige", "being", - "belief", "bell", "belly", "belong", "below", "belt", "bench", - "bend", "benign", "bent", "berry", "berth", "beset", "beside", - "best", "bestow", "bet", "beta", "betray", "better", "beware", - "beyond", "bias", "biceps", "bicker", "bid", "big", "bigger", - "bike", "bile", "bill", "binary", "bind", "biopsy", "birch", - "bird", "birdie", "birth", "bishop", "bit", "bitch", "bite", - "bitter", "black", "blade", "blame", "bland", "blast", "blaze", - "bleak", "blend", "bless", "blew", "blind", "blink", "blip", - "bliss", "blitz", "block", "blond", "blood", "bloody", "bloom", - "blot", "blouse", "blow", "blue", "bluff", "blunt", "blur", - "blush", "boar", "board", "boast", "boat", "bodily", "body", - "bogus", "boil", "bold", "bolt", "bomb", "bond", "bombay", "bonn", - "boost", "boot", "booth", "booze", "border", "bore", "borrow", - "bosom", "boss", "both", "bother", "bottle", "bottom", "bought", - "boston", "brazil", "briton", "buddha", "burma", "caesar", "cairo", - "bounce", "bound", "bounty", "bout", "bovine", "bow", "bowel", - "bowl", "box", "boy", "boyish", "brace", "brain", "brainy", - "brake", "bran", "branch", "brand", "brandy", "brass", "brave", - "bravo", "breach", "bread", "break", "breast", "breath", "bred", - "breed", "breeze", "brew", "brick", "bride", "bridge", "brief", - "bright", "brim", "brine", "bring", "brink", "brisk", "broad", + "assume", "assure", "asthma", "astute", "asylum", "ate", "athens", + "atlas", "atom", "atomic", "attach", "attack", "attain", "attend", + "attic", "auburn", "audio", "audit", "august", "aunt", "auntie", + "aura", "austin", "author", "auto", "autumn", "avail", "avenge", + "avenue", "avert", "avid", "avoid", "await", "awake", "awaken", + "award", "aware", "awash", "away", "awful", "awhile", "axes", + "axiom", "axis", "axle", "aye", "babe", "baby", "bach", "back", + "backup", "bacon", "bad", "badge", "badly", "bag", "baggy", "bail", + "bait", "bake", "baker", "bakery", "bald", "ball", "ballad", + "ballet", "ballot", "baltic", "bamboo", "ban", "banal", "banana", + "band", "bang", "bank", "bar", "barber", "bare", "barely", "barge", + "bark", "barley", "barn", "baron", "barrel", "barren", "basalt", + "base", "basic", "basil", "basin", "basis", "basket", "basque", + "bass", "bat", "batch", "bath", "baton", "battle", "bay", "beach", + "beacon", "beak", "beam", "bean", "bear", "beard", "beast", "beat", + "beauty", "become", "bed", "beech", "beef", "beefy", "beep", + "beer", "beet", "beetle", "before", "beggar", "begin", "behalf", + "behave", "behind", "beige", "being", "belief", "bell", "belly", + "belong", "below", "belt", "bench", "bend", "benign", "bent", + "berlin", "berry", "berth", "beset", "beside", "best", "bestow", + "bet", "beta", "betray", "better", "beware", "beyond", "bias", + "bible", "biceps", "bicker", "bid", "big", "bigger", "bike", + "bile", "bill", "binary", "bind", "biopsy", "birch", "bird", + "birdie", "birth", "bishop", "bit", "bitch", "bite", "bitter", + "black", "blade", "blame", "bland", "blast", "blaze", "bleak", + "blend", "bless", "blew", "blind", "blink", "blip", "bliss", + "blitz", "block", "blond", "blood", "bloody", "bloom", "blot", + "blouse", "blow", "blue", "bluff", "blunt", "blur", "blush", + "boar", "board", "boast", "boat", "bodily", "body", "bogus", + "boil", "bold", "bolt", "bomb", "bombay", "bond", "bone", "bonn", + "bonnet", "bonus", "bony", "book", "boom", "boost", "boot", + "booth", "booze", "border", "bore", "borrow", "bosom", "boss", + "boston", "both", "bother", "bottle", "bottom", "bought", "bounce", + "bound", "bounty", "bout", "bovine", "bow", "bowel", "bowl", "box", + "boy", "boyish", "brace", "brain", "brainy", "brake", "bran", + "branch", "brand", "brandy", "brass", "brave", "bravo", "brazil", + "breach", "bread", "break", "breast", "breath", "bred", "breed", + "breeze", "brew", "brick", "bride", "bridge", "brief", "bright", + "brim", "brine", "bring", "brink", "brisk", "briton", "broad", "broke", "broken", "bronze", "brook", "broom", "brown", "bruise", "brush", "brutal", "brute", "bubble", "buck", "bucket", "buckle", - "budget", "buffet", "buggy", "build", "bulb", "bulge", "bulk", - "bulky", "bull", "bullet", "bully", "bump", "bumpy", "bunch", - "bundle", "bunk", "bunny", "burden", "bureau", "burial", "buried", - "burly", "burn", "burnt", "burrow", "burst", "bury", "bus", "bush", - "bust", "bustle", "busy", "but", "butler", "butt", "butter", - "button", "buy", "buyer", "buzz", "bye", "byte", "cab", "cabin", - "cable", "cache", "cactus", "cage", "cake", "calf", "call", - "caller", "calm", "calmly", "came", "camel", "camera", "camp", - "campus", "can", "canal", "canary", "cancel", "cancer", "candid", - "canada", "bone", "bonnet", "bonus", "bony", "book", "boom", - "candle", "candy", "cane", "canine", "canoe", "canopy", "canvas", - "canyon", "cap", "cape", "car", "carbon", "card", "care", "career", - "caress", "cargo", "carnal", "carp", "carpet", "carrot", "carry", - "cart", "carl", "carol", "celtic", "chile", "china", "christ", - "cask", "cast", "castle", "casual", "cat", "catch", "cater", - "cattle", "caught", "causal", "cause", "cave", "cease", "celery", - "cell", "cellar", "cement", "censor", "census", "cereal", "cervix", + "buddha", "budget", "buffet", "buggy", "build", "bulb", "bulge", + "bulk", "bulky", "bull", "bullet", "bully", "bump", "bumpy", + "bunch", "bundle", "bunk", "bunny", "burden", "bureau", "burial", + "buried", "burly", "burma", "burn", "burnt", "burrow", "burst", + "bury", "bus", "bush", "bust", "bustle", "busy", "but", "butler", + "butt", "butter", "button", "buy", "buyer", "buzz", "bye", "byte", + "cab", "cabin", "cable", "cache", "cactus", "caesar", "cage", + "cairo", "cake", "calf", "call", "caller", "calm", "calmly", + "came", "camel", "camera", "camp", "campus", "can", "canada", + "canal", "canary", "cancel", "cancer", "candid", "candle", "candy", + "cane", "canine", "canoe", "canopy", "canvas", "canyon", "cap", + "cape", "car", "carbon", "card", "care", "career", "caress", + "cargo", "carl", "carnal", "carol", "carp", "carpet", "carrot", + "carry", "cart", "cartel", "case", "cash", "cask", "cast", + "castle", "casual", "cat", "catch", "cater", "cattle", "caught", + "causal", "cause", "cave", "cease", "celery", "cell", "cellar", + "celtic", "cement", "censor", "census", "cereal", "cervix", "chain", "chair", "chalk", "chalky", "champ", "chance", "change", "chant", "chaos", "chap", "chapel", "charge", "charm", "chart", "chase", "chat", "cheap", "cheat", "check", "cheek", "cheeky", "cheer", "cheery", "cheese", "chef", "cherry", "chess", "chest", - "chew", "chic", "chick", "chief", "child", "chill", "chilly", - "chin", "chip", "choice", "choir", "choose", "chop", "choppy", - "chord", "chorus", "chose", "chosen", "chrome", "chunk", "chunky", - "church", "cider", "cigar", "cinema", "circa", "circle", "circus", - "cite", "city", "civic", "civil", "clad", "claim", "clammy", - "clan", "clap", "clash", "clasp", "class", "clause", "claw", - "clay", "clean", "clear", "clergy", "clerk", "clever", "click", - "client", "cliff", "climax", "climb", "clinch", "cling", "clinic", - "clip", "cloak", "clock", "clone", "close", "closer", "closet", - "cloth", "cloud", "cloudy", "clout", "clown", "club", "clue", - "clumsy", "clung", "clutch", "coach", "coal", "coarse", "coast", - "coat", "coax", "cobalt", "cobra", "coca", "cock", "cocoa", "code", - "coffee", "coffin", "cohort", "coil", "coin", "coke", "cold", - "collar", "colon", "colony", "colt", "column", "comb", "combat", - "come", "comedy", "comic", "commit", "common", "compel", "comply", - "concur", "cone", "confer", "consul", "convex", "convey", "convoy", - "congo", "cuba", "cyprus", "czech", "cartel", "case", "cash", - "cook", "cool", "cope", "copper", "copy", "coral", "cord", "core", - "cork", "corn", "corner", "corps", "corpse", "corpus", "cortex", - "cosmic", "cosmos", "cost", "costly", "cosy", "cotton", "couch", - "cough", "could", "count", "county", "coup", "couple", "coupon", - "course", "court", "cousin", "cove", "cover", "covert", "cow", - "coward", "cowboy", "crab", "crack", "cradle", "craft", "crafty", - "crag", "crane", "crap", "crash", "crate", "crater", "crawl", - "crazy", "creak", "cream", "creamy", "create", "credit", "creed", - "creek", "creep", "creepy", "crept", "crest", "crew", "cried", - "crime", "crisis", "crisp", "critic", "croft", "crook", "crop", - "cross", "crow", "crowd", "crown", "crude", "cruel", "cruise", - "crunch", "crush", "crust", "crux", "cry", "crypt", "cube", - "cubic", "cuckoo", "cuff", "cult", "cup", "curb", "cure", "curfew", - "curl", "curry", "curse", "cursor", "curve", "custom", "cut", - "cute", "cycle", "cyclic", "cynic", "dad", "daddy", "dagger", - "daily", "dairy", "daisy", "dale", "damage", "damn", "damp", - "dampen", "dance", "danger", "dare", "dallas", "danish", "darwin", - "dark", "darken", "dash", "data", "date", "dawn", "day", "dead", - "david", "delhi", "derby", "diana", "dublin", "dutch", "east", - "deadly", "deaf", "deal", "dealer", "dean", "dear", "death", - "debate", "debit", "debris", "debt", "debtor", "decade", "decay", - "decent", "decide", "deck", "decor", "decree", "deduce", "deed", - "deep", "deeply", "deer", "defeat", "defect", "defend", "defer", - "define", "defy", "degree", "deity", "delay", "delete", "delta", - "demand", "demise", "demo", "demon", "demure", "denial", "denote", - "dense", "dental", "deny", "depart", "depend", "depict", "deploy", - "depot", "depth", "deputy", "derive", "desert", "design", "desire", - "desist", "desk", "detail", "detect", "deter", "detest", "detour", - "device", "devil", "devise", "devoid", "devote", "devour", "dial", - "diary", "dice", "dictum", "did", "die", "diesel", "diet", - "differ", "digest", "digit", "dine", "dinghy", "dinner", "diode", - "dire", "direct", "dirt", "dirty", "disc", "disco", "dish", "disk", - "dismal", "dispel", "ditch", "dive", "divert", "divide", "divine", - "dizzy", "docile", "dock", "doctor", "dog", "dogma", "dole", - "doll", "dollar", "dolly", "domain", "dome", "domino", "donate", - "done", "donkey", "donor", "doom", "door", "dorsal", "dose", - "double", "doubt", "dough", "dour", "dove", "down", "dozen", - "draft", "drag", "dragon", "drain", "drama", "drank", "draw", - "drawer", "dread", "dream", "dreary", "dress", "drew", "dried", - "drift", "drill", "drink", "drip", "drive", "driver", "drop", - "drove", "drown", "drug", "drum", "drunk", "dry", "dual", "duck", - "duct", "due", "duel", "duet", "duke", "dull", "duly", "dumb", - "dummy", "dump", "dune", "dung", "duress", "during", "dusk", - "dust", "dusty", "duty", "dwarf", "dwell", "dyer", "dying", + "chew", "chic", "chick", "chief", "child", "chile", "chill", + "chilly", "chin", "china", "chip", "choice", "choir", "choose", + "chop", "choppy", "chord", "chorus", "chose", "chosen", "christ", + "chrome", "chunk", "chunky", "church", "cider", "cigar", "cinema", + "circa", "circle", "circus", "cite", "city", "civic", "civil", + "clad", "claim", "clammy", "clan", "clap", "clash", "clasp", + "class", "clause", "claw", "clay", "clean", "clear", "clergy", + "clerk", "clever", "click", "client", "cliff", "climax", "climb", + "clinch", "cling", "clinic", "clip", "cloak", "clock", "clone", + "close", "closer", "closet", "cloth", "cloud", "cloudy", "clout", + "clown", "club", "clue", "clumsy", "clung", "clutch", "coach", + "coal", "coarse", "coast", "coat", "coax", "cobalt", "cobra", + "coca", "cock", "cocoa", "code", "coffee", "coffin", "cohort", + "coil", "coin", "coke", "cold", "collar", "colon", "colony", + "colt", "column", "comb", "combat", "come", "comedy", "comic", + "commit", "common", "compel", "comply", "concur", "cone", "confer", + "congo", "consul", "convex", "convey", "convoy", "cook", "cool", + "cope", "copper", "copy", "coral", "cord", "core", "cork", "corn", + "corner", "corps", "corpse", "corpus", "cortex", "cosmic", + "cosmos", "cost", "costly", "cosy", "cotton", "couch", "cough", + "could", "count", "county", "coup", "couple", "coupon", "course", + "court", "cousin", "cove", "cover", "covert", "cow", "coward", + "cowboy", "crab", "crack", "cradle", "craft", "crafty", "crag", + "crane", "crap", "crash", "crate", "crater", "crawl", "crazy", + "creak", "cream", "creamy", "create", "credit", "creed", "creek", + "creep", "creepy", "crept", "crest", "crew", "cried", "crime", + "crisis", "crisp", "critic", "croft", "crook", "crop", "cross", + "crow", "crowd", "crown", "crude", "cruel", "cruise", "crunch", + "crush", "crust", "crux", "cry", "crypt", "cuba", "cube", "cubic", + "cuckoo", "cuff", "cult", "cup", "curb", "cure", "curfew", "curl", + "curry", "curse", "cursor", "curve", "custom", "cut", "cute", + "cycle", "cyclic", "cynic", "cyprus", "czech", "dad", "daddy", + "dagger", "daily", "dairy", "daisy", "dale", "dallas", "damage", + "damn", "damp", "dampen", "dance", "danger", "danish", "dare", + "dark", "darken", "darwin", "dash", "data", "date", "david", + "dawn", "day", "dead", "deadly", "deaf", "deal", "dealer", "dean", + "dear", "death", "debate", "debit", "debris", "debt", "debtor", + "decade", "decay", "decent", "decide", "deck", "decor", "decree", + "deduce", "deed", "deep", "deeply", "deer", "defeat", "defect", + "defend", "defer", "define", "defy", "degree", "deity", "delay", + "delete", "delhi", "delta", "demand", "demise", "demo", "demon", + "demure", "denial", "denote", "dense", "dental", "deny", "depart", + "depend", "depict", "deploy", "depot", "depth", "deputy", "derby", + "derive", "desert", "design", "desire", "desist", "desk", "detail", + "detect", "deter", "detest", "detour", "device", "devil", "devise", + "devoid", "devote", "devour", "dial", "diana", "diary", "dice", + "dictum", "did", "die", "diesel", "diet", "differ", "digest", + "digit", "dine", "dinghy", "dinner", "diode", "dire", "direct", + "dirt", "dirty", "disc", "disco", "dish", "disk", "dismal", + "dispel", "ditch", "dive", "divert", "divide", "divine", "dizzy", + "docile", "dock", "doctor", "dog", "dogma", "dole", "doll", + "dollar", "dolly", "domain", "dome", "domino", "donate", "done", + "donkey", "donor", "doom", "door", "dorsal", "dose", "double", + "doubt", "dough", "dour", "dove", "down", "dozen", "draft", "drag", + "dragon", "drain", "drama", "drank", "draw", "drawer", "dread", + "dream", "dreary", "dress", "drew", "dried", "drift", "drill", + "drink", "drip", "drive", "driver", "drop", "drove", "drown", + "drug", "drum", "drunk", "dry", "dual", "dublin", "duck", "duct", + "due", "duel", "duet", "duke", "dull", "duly", "dumb", "dummy", + "dump", "dune", "dung", "duress", "during", "dusk", "dust", + "dusty", "dutch", "duty", "dwarf", "dwell", "dyer", "dying", "dynamo", "each", "eager", "eagle", "ear", "earl", "early", "earn", - "earth", "ease", "easel", "easily", "easter", "easy", "eat", - "eaten", "eater", "echo", "eddy", "edge", "edible", "eden", - "edward", "eric", "essex", "europe", "eve", "exodus", "france", - "effect", "effort", "egg", "ego", "eight", "eighth", "eighty", - "either", "elbow", "elder", "eldest", "elect", "eleven", "elicit", - "elite", "else", "elude", "elves", "embark", "emblem", "embryo", - "emerge", "emit", "empire", "employ", "empty", "enable", "enamel", - "end", "endure", "enemy", "energy", "engage", "engine", "enjoy", - "enlist", "enough", "ensure", "entail", "enter", "entire", "entry", - "envoy", "envy", "enzyme", "epic", "epoch", "equal", "equate", - "equip", "equity", "era", "erase", "erect", "erode", "erotic", - "errant", "error", "escape", "escort", "essay", "estate", "esteem", - "ethic", "ethnic", "evade", "even", "event", "ever", "every", - "evict", "evil", "evoke", "evolve", "exact", "exam", "exceed", - "excel", "except", "excess", "excise", "excite", "excuse", - "exempt", "exert", "exile", "exist", "exit", "exotic", "expand", - "expect", "expert", "expire", "export", "expose", "extend", - "extra", "eye", "eyed", "fabric", "face", "facial", "fact", - "factor", "fade", "fail", "faint", "fair", "fairly", "fairy", - "faith", "fake", "falcon", "fall", "false", "falter", "fame", - "family", "famine", "famous", "fan", "fancy", "far", "farce", - "fare", "farm", "farmer", "fast", "fasten", "faster", "fat", - "fatal", "fate", "father", "fatty", "fault", "faulty", "fauna", - "fear", "feast", "feat", "fed", "fee", "feeble", "feed", "feel", - "feet", "fell", "fellow", "felt", "female", "fence", "fend", - "ferry", "fetal", "fetch", "feudal", "fever", "few", "fewer", - "fiance", "fiasco", "fiddle", "field", "fiend", "fierce", "fiery", - "fifth", "fifty", "fig", "fight", "figure", "file", "fill", - "filled", "filler", "film", "filter", "filth", "filthy", "final", - "finale", "find", "fine", "finger", "finish", "finite", "fire", - "firm", "firmly", "first", "fiscal", "fish", "fisher", "fist", - "fit", "fitful", "five", "fix", "flag", "flair", "flak", "flame", - "flank", "flap", "flare", "flash", "flask", "flat", "flaw", "fled", - "flee", "fleece", "fleet", "flesh", "fleshy", "flew", "flick", - "flight", "flimsy", "flint", "flirt", "float", "flock", "flood", - "floor", "floppy", "flora", "floral", "flour", "flow", "flower", - "fluent", "fluffy", "fluid", "flung", "flurry", "flush", "flute", - "flux", "fly", "flyer", "foal", "foam", "focal", "focus", "fog", - "foil", "fold", "folk", "follow", "folly", "fond", "fondly", - "font", "food", "fool", "foot", "for", "forbid", "force", "ford", - "forest", "forge", "forget", "fork", "form", "formal", "format", - "former", "fort", "forth", "forty", "forum", "fossil", "foster", - "foul", "found", "four", "fourth", "fox", "foyer", "frail", - "frame", "franc", "frank", "fraud", "free", "freed", "freely", - "freer", "freeze", "frenzy", "fresh", "friar", "fridge", "fried", - "french", "friday", "edict", "edit", "editor", "eerie", "eerily", - "friend", "fright", "fringe", "frock", "frog", "from", "front", - "frost", "frosty", "frown", "frozen", "frugal", "fruit", "fudge", - "fuel", "fulfil", "full", "fully", "fun", "fund", "funny", "fur", - "furry", "fury", "fuse", "fusion", "fuss", "fussy", "futile", - "future", "fuzzy", "gadget", "gag", "gain", "gala", "galaxy", - "gale", "gall", "galley", "gallon", "gallop", "gamble", "game", - "gamma", "gang", "gandhi", "gaul", "gemini", "geneva", "george", - "garden", "garlic", "gas", "gasp", "gate", "gather", "gauge", - "gaunt", "gave", "gay", "gaze", "gear", "geese", "gender", "gene", - "genial", "genius", "genre", "gentle", "gently", "gentry", "genus", - "german", "gloria", "god", "gothic", "greece", "gap", "garage", - "get", "ghetto", "ghost", "giant", "gift", "giggle", "gill", - "gilt", "ginger", "girl", "give", "given", "glad", "glade", - "glance", "gland", "glare", "glass", "glassy", "gleam", "glee", - "glide", "global", "globe", "gloom", "gloomy", "glory", "gloss", - "glossy", "glove", "glow", "glue", "goal", "goat", "gold", - "golden", "golf", "gone", "gong", "good", "goose", "gorge", "gory", - "gosh", "gospel", "gossip", "got", "govern", "gown", "grab", + "earth", "ease", "easel", "easily", "east", "easter", "easy", + "eat", "eaten", "eater", "echo", "eddy", "eden", "edge", "edible", + "edict", "edit", "editor", "edward", "eerie", "eerily", "effect", + "effort", "egg", "ego", "eight", "eighth", "eighty", "either", + "elbow", "elder", "eldest", "elect", "eleven", "elicit", "elite", + "else", "elude", "elves", "embark", "emblem", "embryo", "emerge", + "emit", "empire", "employ", "empty", "enable", "enamel", "end", + "endure", "enemy", "energy", "engage", "engine", "enjoy", "enlist", + "enough", "ensure", "entail", "enter", "entire", "entry", "envoy", + "envy", "enzyme", "epic", "epoch", "equal", "equate", "equip", + "equity", "era", "erase", "erect", "eric", "erode", "erotic", + "errant", "error", "escape", "escort", "essay", "essex", "estate", + "esteem", "ethic", "ethnic", "europe", "evade", "eve", "even", + "event", "ever", "every", "evict", "evil", "evoke", "evolve", + "exact", "exam", "exceed", "excel", "except", "excess", "excise", + "excite", "excuse", "exempt", "exert", "exile", "exist", "exit", + "exodus", "exotic", "expand", "expect", "expert", "expire", + "export", "expose", "extend", "extra", "eye", "eyed", "fabric", + "face", "facial", "fact", "factor", "fade", "fail", "faint", + "fair", "fairly", "fairy", "faith", "fake", "falcon", "fall", + "false", "falter", "fame", "family", "famine", "famous", "fan", + "fancy", "far", "farce", "fare", "farm", "farmer", "fast", + "fasten", "faster", "fat", "fatal", "fate", "father", "fatty", + "fault", "faulty", "fauna", "fear", "feast", "feat", "fed", "fee", + "feeble", "feed", "feel", "feet", "fell", "fellow", "felt", + "female", "fence", "fend", "ferry", "fetal", "fetch", "feudal", + "fever", "few", "fewer", "fiance", "fiasco", "fiddle", "field", + "fiend", "fierce", "fiery", "fifth", "fifty", "fig", "fight", + "figure", "file", "fill", "filled", "filler", "film", "filter", + "filth", "filthy", "final", "finale", "find", "fine", "finger", + "finish", "finite", "fire", "firm", "firmly", "first", "fiscal", + "fish", "fisher", "fist", "fit", "fitful", "five", "fix", "flag", + "flair", "flak", "flame", "flank", "flap", "flare", "flash", + "flask", "flat", "flaw", "fled", "flee", "fleece", "fleet", + "flesh", "fleshy", "flew", "flick", "flight", "flimsy", "flint", + "flirt", "float", "flock", "flood", "floor", "floppy", "flora", + "floral", "flour", "flow", "flower", "fluent", "fluffy", "fluid", + "flung", "flurry", "flush", "flute", "flux", "fly", "flyer", + "foal", "foam", "focal", "focus", "fog", "foil", "fold", "folk", + "follow", "folly", "fond", "fondly", "font", "food", "fool", + "foot", "for", "forbid", "force", "ford", "forest", "forge", + "forget", "fork", "form", "formal", "format", "former", "fort", + "forth", "forty", "forum", "fossil", "foster", "foul", "found", + "four", "fourth", "fox", "foyer", "frail", "frame", "franc", + "france", "frank", "fraud", "free", "freed", "freely", "freer", + "freeze", "french", "frenzy", "fresh", "friar", "friday", "fridge", + "fried", "friend", "fright", "fringe", "frock", "frog", "from", + "front", "frost", "frosty", "frown", "frozen", "frugal", "fruit", + "fudge", "fuel", "fulfil", "full", "fully", "fun", "fund", "funny", + "fur", "furry", "fury", "fuse", "fusion", "fuss", "fussy", + "futile", "future", "fuzzy", "gadget", "gag", "gain", "gala", + "galaxy", "gale", "gall", "galley", "gallon", "gallop", "gamble", + "game", "gamma", "gandhi", "gang", "gap", "garage", "garden", + "garlic", "gas", "gasp", "gate", "gather", "gauge", "gaul", + "gaunt", "gave", "gay", "gaze", "gear", "geese", "gemini", + "gender", "gene", "geneva", "genial", "genius", "genre", "gentle", + "gently", "gentry", "genus", "george", "german", "get", "ghetto", + "ghost", "giant", "gift", "giggle", "gill", "gilt", "ginger", + "girl", "give", "given", "glad", "glade", "glance", "gland", + "glare", "glass", "glassy", "gleam", "glee", "glide", "global", + "globe", "gloom", "gloomy", "gloria", "glory", "gloss", "glossy", + "glove", "glow", "glue", "goal", "goat", "god", "gold", "golden", + "golf", "gone", "gong", "good", "goose", "gorge", "gory", "gosh", + "gospel", "gossip", "got", "gothic", "govern", "gown", "grab", "grace", "grade", "grain", "grand", "grant", "grape", "graph", "grasp", "grass", "grassy", "grate", "grave", "gravel", "gravy", - "gray", "grease", "greasy", "great", "greed", "greedy", "green", - "greet", "grew", "grey", "grid", "grief", "grill", "grim", "grin", - "grind", "greek", "hague", "haiti", "hanoi", "harry", "havana", + "gray", "grease", "greasy", "great", "greece", "greed", "greedy", + "greek", "green", "greet", "grew", "grey", "grid", "grief", + "grill", "grim", "grin", "grind", "grip", "grit", "gritty", "groan", "groin", "groom", "groove", "gross", "ground", "group", "grove", "grow", "grown", "growth", "grudge", "grunt", "guard", "guess", "guest", "guide", "guild", "guilt", "guilty", "guise", "guitar", "gulf", "gully", "gun", "gunman", "guru", "gut", "guy", - "gypsy", "habit", "hack", "had", "hail", "hair", "hairy", "hale", - "half", "hall", "halt", "hamlet", "hammer", "hand", "handle", - "handy", "hang", "hangar", "happen", "happy", "harass", "hard", - "harder", "hardly", "hare", "harem", "harm", "harp", "harsh", - "has", "hash", "hassle", "haste", "hasten", "hasty", "hat", - "hatch", "hate", "haul", "haunt", "have", "haven", "havoc", "hawk", - "hawaii", "hebrew", "henry", "hermes", "grip", "grit", "gritty", - "hazard", "haze", "hazel", "hazy", "head", "heal", "health", - "heap", "hear", "heard", "heart", "hearth", "hearty", "heat", - "heater", "heaven", "heavy", "heck", "hectic", "hedge", "heel", - "hefty", "height", "heir", "held", "helium", "helix", "hell", - "hello", "helm", "helmet", "help", "hemp", "hence", "her", - "herald", "herb", "herd", "here", "hereby", "hernia", "hero", - "heroic", "heroin", "hey", "heyday", "hick", "hidden", "hide", - "high", "higher", "highly", "hill", "him", "hind", "hint", "hippy", - "hire", "his", "hiss", "hit", "hive", "hindu", "hitler", "idaho", + "gypsy", "habit", "hack", "had", "hague", "hail", "hair", "hairy", + "haiti", "hale", "half", "hall", "halt", "hamlet", "hammer", + "hand", "handle", "handy", "hang", "hangar", "hanoi", "happen", + "happy", "harass", "hard", "harder", "hardly", "hare", "harem", + "harm", "harp", "harry", "harsh", "has", "hash", "hassle", "haste", + "hasten", "hasty", "hat", "hatch", "hate", "haul", "haunt", + "havana", "have", "haven", "havoc", "hawaii", "hawk", "hazard", + "haze", "hazel", "hazy", "head", "heal", "health", "heap", "hear", + "heard", "heart", "hearth", "hearty", "heat", "heater", "heaven", + "heavy", "hebrew", "heck", "hectic", "hedge", "heel", "hefty", + "height", "heir", "held", "helium", "helix", "hell", "hello", + "helm", "helmet", "help", "hemp", "hence", "henry", "her", + "herald", "herb", "herd", "here", "hereby", "hermes", "hernia", + "hero", "heroic", "heroin", "hey", "heyday", "hick", "hidden", + "hide", "high", "higher", "highly", "hill", "him", "hind", "hindu", + "hint", "hippy", "hire", "his", "hiss", "hit", "hitler", "hive", "hoard", "hoarse", "hobby", "hockey", "hold", "holder", "hole", "hollow", "holly", "holy", "home", "honest", "honey", "hood", "hook", "hope", "horn", "horny", "horrid", "horror", "horse", @@ -346,151 +345,151 @@ pub const WORD_LIST: &[&str] = &[ "how", "huge", "hull", "human", "humane", "humble", "humid", "hung", "hunger", "hungry", "hunt", "hurdle", "hurl", "hurry", "hurt", "hush", "hut", "hybrid", "hymn", "hyphen", "ice", "icing", - "icon", "idea", "ideal", "idiom", "idiot", "idle", "idly", "idol", - "ignite", "ignore", "ill", "image", "immune", "impact", "imply", - "import", "impose", "incest", "inch", "income", "incur", "indeed", - "inca", "india", "indian", "iowa", "iran", "iraq", "irish", - "index", "indoor", "induce", "inept", "inert", "infant", "infect", - "infer", "influx", "inform", "inject", "injure", "injury", - "inlaid", "inland", "inlet", "inmate", "inn", "innate", "inner", - "input", "insane", "insect", "insert", "inset", "inside", "insist", - "insult", "insure", "intact", "intake", "intend", "inter", "into", - "invade", "invent", "invest", "invite", "invoke", "inward", "iron", - "ironic", "irony", "island", "isle", "issue", "itch", "item", - "isaac", "isabel", "islam", "israel", "italy", "ivan", "jack", - "jacob", "james", "japan", "itself", "ivory", "jacket", "jade", - "jaguar", "jail", "jargon", "jaw", "jazz", "jeep", "java", - "jersey", "jesus", "jewish", "jim", "john", "jordan", "joseph", - "jock", "jockey", "join", "joint", "joke", "jolly", "jolt", "joy", - "joyful", "joyous", "judge", "juice", "juicy", "jumble", "jumbo", - "judas", "judy", "jelly", "jerky", "jest", "jet", "jewel", "job", - "july", "june", "kansas", "karl", "kenya", "koran", "korea", - "junk", "junta", "jury", "just", "karate", "keel", "keen", "keep", - "keeper", "kept", "kernel", "kettle", "key", "khaki", "kick", - "kid", "kidnap", "kidney", "kill", "killer", "kin", "kind", - "kindly", "king", "kiss", "kite", "kitten", "knack", "knee", - "knew", "knife", "knight", "knit", "knob", "knock", "knot", "know", - "known", "label", "lace", "lack", "lad", "ladder", "laden", "lady", - "kuwait", "laos", "latin", "leo", "jump", "jungle", "junior", - "lagoon", "laity", "lake", "lamb", "lame", "lamp", "lance", "land", - "lane", "lap", "lapse", "large", "larval", "laser", "last", - "latch", "late", "lately", "latent", "later", "latest", "latter", - "laugh", "launch", "lava", "lavish", "law", "lawful", "lawn", - "lawyer", "lay", "layer", "layman", "lazy", "lead", "leader", - "leaf", "leafy", "league", "leak", "leaky", "lean", "leap", - "learn", "lease", "leash", "least", "leave", "led", "ledge", - "left", "leg", "legacy", "legal", "legend", "legion", "lemon", - "lend", "length", "lens", "lent", "leper", "lesion", "less", - "lessen", "lesser", "lesson", "lest", "let", "lethal", "letter", - "level", "lever", "levy", "lewis", "liable", "liar", "libel", - "libya", "lima", "lisbon", "liz", "london", "louvre", "lucy", - "life", "lift", "light", "like", "likely", "limb", "lime", "limit", - "limp", "line", "linear", "linen", "linger", "link", "lion", "lip", - "liquid", "liquor", "list", "listen", "lit", "live", "lively", - "liver", "lizard", "load", "loaf", "loan", "lobby", "lobe", - "local", "locate", "lock", "locus", "lodge", "loft", "lofty", - "log", "logic", "logo", "lone", "lonely", "long", "longer", "look", - "loop", "loose", "loosen", "loot", "lord", "lorry", "lose", "loss", - "lost", "lot", "lotion", "lotus", "loud", "loudly", "lounge", - "lousy", "love", "lovely", "lover", "low", "lower", "lowest", - "loyal", "lucid", "luck", "lucky", "lull", "lump", "lumpy", - "lunacy", "lunar", "lunch", "lung", "lure", "lurid", "lush", - "lust", "lute", "luxury", "lying", "lymph", "lynch", "lyric", - "luther", "madame", "madrid", "lice", "lick", "lid", "lie", "lied", - "macho", "macro", "mad", "madam", "made", "mafia", "magic", - "magma", "magnet", "magnum", "maid", "maiden", "mail", "main", - "mainly", "major", "make", "maker", "male", "malice", "mall", - "malt", "mammal", "manage", "mane", "malta", "maria", "mars", - "mania", "manic", "manner", "manor", "mantle", "manual", "manure", - "many", "map", "maple", "marble", "march", "mare", "margin", - "marina", "mark", "market", "marry", "marsh", "martin", "martyr", - "mary", "maya", "mecca", "mexico", "miami", "mickey", "milan", - "mask", "mason", "mass", "mast", "master", "match", "mate", - "matrix", "matter", "mature", "maxim", "may", "maybe", "mayor", - "maze", "mead", "meadow", "meal", "mean", "meant", "meat", "medal", - "media", "median", "medic", "medium", "meet", "mellow", "melody", - "melon", "melt", "member", "memo", "memory", "menace", "mend", - "mental", "mentor", "menu", "mercy", "mere", "merely", "merge", - "merger", "merit", "merry", "mesh", "mess", "messy", "met", - "metal", "meter", "method", "methyl", "metric", "metro", "mid", - "midday", "middle", "midst", "midway", "might", "mighty", "mild", - "mildew", "mile", "milk", "milky", "mill", "mimic", "mince", - "mind", "mine", "mini", "mink", "minor", "mint", "minus", "minute", - "mirror", "mirth", "misery", "miss", "mist", "misty", "mite", - "mix", "moan", "moat", "mobile", "mock", "mode", "model", "modem", - "modern", "modest", "modify", "module", "moist", "molar", "mole", - "molten", "moment", "monaco", "monday", "moscow", "moses", - "monies", "monk", "monkey", "month", "mood", "moody", "moon", - "moor", "moral", "morale", "morbid", "more", "morgue", "mortal", - "mortar", "mosaic", "mosque", "moss", "most", "mostly", "moth", - "moslem", "mrs", "munich", "muslim", "naples", "nazi", "money", - "mother", "motion", "motive", "motor", "mould", "mount", "mourn", - "mouse", "mouth", "move", "movie", "much", "muck", "mucus", "mud", - "muddle", "muddy", "mule", "mummy", "murder", "murky", "murmur", - "muscle", "museum", "music", "mussel", "must", "mutant", "mute", - "mutiny", "mutter", "mutton", "mutual", "muzzle", "myopic", - "myriad", "myself", "mystic", "myth", "nadir", "nail", "naked", - "name", "namely", "nape", "napkin", "narrow", "nasal", "nasty", - "nation", "native", "nature", "nausea", "naval", "nave", "navy", + "icon", "idaho", "idea", "ideal", "idiom", "idiot", "idle", "idly", + "idol", "ignite", "ignore", "ill", "image", "immune", "impact", + "imply", "import", "impose", "inca", "incest", "inch", "income", + "incur", "indeed", "index", "india", "indian", "indoor", "induce", + "inept", "inert", "infant", "infect", "infer", "influx", "inform", + "inject", "injure", "injury", "inlaid", "inland", "inlet", + "inmate", "inn", "innate", "inner", "input", "insane", "insect", + "insert", "inset", "inside", "insist", "insult", "insure", + "intact", "intake", "intend", "inter", "into", "invade", "invent", + "invest", "invite", "invoke", "inward", "iowa", "iran", "iraq", + "irish", "iron", "ironic", "irony", "isaac", "isabel", "islam", + "island", "isle", "israel", "issue", "italy", "itch", "item", + "itself", "ivan", "ivory", "jack", "jacket", "jacob", "jade", + "jaguar", "jail", "james", "japan", "jargon", "java", "jaw", + "jazz", "jeep", "jelly", "jerky", "jersey", "jest", "jesus", "jet", + "jewel", "jewish", "jim", "job", "jock", "jockey", "john", "join", + "joint", "joke", "jolly", "jolt", "jordan", "joseph", "joy", + "joyful", "joyous", "judas", "judge", "judy", "juice", "juicy", + "july", "jumble", "jumbo", "jump", "june", "jungle", "junior", + "junk", "junta", "jury", "just", "kansas", "karate", "karl", + "keel", "keen", "keep", "keeper", "kenya", "kept", "kernel", + "kettle", "key", "khaki", "kick", "kid", "kidnap", "kidney", + "kill", "killer", "kin", "kind", "kindly", "king", "kiss", "kite", + "kitten", "knack", "knee", "knew", "knife", "knight", "knit", + "knob", "knock", "knot", "know", "known", "koran", "korea", + "kuwait", "label", "lace", "lack", "lad", "ladder", "laden", + "lady", "lagoon", "laity", "lake", "lamb", "lame", "lamp", "lance", + "land", "lane", "laos", "lap", "lapse", "large", "larval", "laser", + "last", "latch", "late", "lately", "latent", "later", "latest", + "latin", "latter", "laugh", "launch", "lava", "lavish", "law", + "lawful", "lawn", "lawyer", "lay", "layer", "layman", "lazy", + "lead", "leader", "leaf", "leafy", "league", "leak", "leaky", + "lean", "leap", "learn", "lease", "leash", "least", "leave", "led", + "ledge", "left", "leg", "legacy", "legal", "legend", "legion", + "lemon", "lend", "length", "lens", "lent", "leo", "leper", + "lesion", "less", "lessen", "lesser", "lesson", "lest", "let", + "lethal", "letter", "level", "lever", "levy", "lewis", "liable", + "liar", "libel", "libya", "lice", "lick", "lid", "lie", "lied", + "life", "lift", "light", "like", "likely", "lima", "limb", "lime", + "limit", "limp", "line", "linear", "linen", "linger", "link", + "lion", "lip", "liquid", "liquor", "lisbon", "list", "listen", + "lit", "live", "lively", "liver", "liz", "lizard", "load", "loaf", + "loan", "lobby", "lobe", "local", "locate", "lock", "locus", + "lodge", "loft", "lofty", "log", "logic", "logo", "london", "lone", + "lonely", "long", "longer", "look", "loop", "loose", "loosen", + "loot", "lord", "lorry", "lose", "loss", "lost", "lot", "lotion", + "lotus", "loud", "loudly", "lounge", "lousy", "louvre", "love", + "lovely", "lover", "low", "lower", "lowest", "loyal", "lucid", + "luck", "lucky", "lucy", "lull", "lump", "lumpy", "lunacy", + "lunar", "lunch", "lung", "lure", "lurid", "lush", "lust", "lute", + "luther", "luxury", "lying", "lymph", "lynch", "lyric", "macho", + "macro", "mad", "madam", "madame", "made", "madrid", "mafia", + "magic", "magma", "magnet", "magnum", "maid", "maiden", "mail", + "main", "mainly", "major", "make", "maker", "male", "malice", + "mall", "malt", "malta", "mammal", "manage", "mane", "mania", + "manic", "manner", "manor", "mantle", "manual", "manure", "many", + "map", "maple", "marble", "march", "mare", "margin", "maria", + "marina", "mark", "market", "marry", "mars", "marsh", "martin", + "martyr", "mary", "mask", "mason", "mass", "mast", "master", + "match", "mate", "matrix", "matter", "mature", "maxim", "may", + "maya", "maybe", "mayor", "maze", "mead", "meadow", "meal", "mean", + "meant", "meat", "mecca", "medal", "media", "median", "medic", + "medium", "meet", "mellow", "melody", "melon", "melt", "member", + "memo", "memory", "menace", "mend", "mental", "mentor", "menu", + "mercy", "mere", "merely", "merge", "merger", "merit", "merry", + "mesh", "mess", "messy", "met", "metal", "meter", "method", + "methyl", "metric", "metro", "mexico", "miami", "mickey", "mid", + "midday", "middle", "midst", "midway", "might", "mighty", "milan", + "mild", "mildew", "mile", "milk", "milky", "mill", "mimic", + "mince", "mind", "mine", "mini", "mink", "minor", "mint", "minus", + "minute", "mirror", "mirth", "misery", "miss", "mist", "misty", + "mite", "mix", "moan", "moat", "mobile", "mock", "mode", "model", + "modem", "modern", "modest", "modify", "module", "moist", "molar", + "mole", "molten", "moment", "monaco", "monday", "money", "monies", + "monk", "monkey", "month", "mood", "moody", "moon", "moor", + "moral", "morale", "morbid", "more", "morgue", "mortal", "mortar", + "mosaic", "moscow", "moses", "moslem", "mosque", "moss", "most", + "mostly", "moth", "mother", "motion", "motive", "motor", "mould", + "mount", "mourn", "mouse", "mouth", "move", "movie", "mrs", "much", + "muck", "mucus", "mud", "muddle", "muddy", "mule", "mummy", + "munich", "murder", "murky", "murmur", "muscle", "museum", "music", + "muslim", "mussel", "must", "mutant", "mute", "mutiny", "mutter", + "mutton", "mutual", "muzzle", "myopic", "myriad", "myself", + "mystic", "myth", "nadir", "nail", "naked", "name", "namely", + "nape", "napkin", "naples", "narrow", "nasal", "nasty", "nation", + "native", "nature", "nausea", "naval", "nave", "navy", "nazi", "near", "nearer", "nearly", "neat", "neatly", "neck", "need", - "needle", "needy", "negate", "neon", "nephew", "nepal", "newark", - "nice", "nicely", "niche", "nickel", "niece", "night", "nimble", - "nile", "nobel", "north", "norway", "ohio", "oscar", "oslo", - "nine", "ninety", "ninth", "noble", "nobody", "node", "noise", - "noisy", "non", "none", "noon", "nor", "norm", "normal", "nose", - "nosy", "not", "note", "notice", "notify", "notion", "nought", - "noun", "novel", "novice", "now", "nozzle", "nude", "null", "numb", - "number", "nurse", "nylon", "nymph", "oak", "oasis", "oath", - "obese", "obey", "object", "oblige", "oboe", "obtain", "occult", - "occupy", "occur", "ocean", "octave", "odd", "off", "offend", - "offer", "office", "offset", "often", "oil", "oily", "okay", "old", - "older", "oldest", "olive", "omega", "omen", "omit", "once", "one", - "onion", "only", "onset", "onto", "onus", "onward", "opaque", - "open", "openly", "opera", "opium", "oppose", "optic", "option", - "oracle", "oral", "orange", "orbit", "orchid", "ordeal", "order", - "organ", "orgasm", "orient", "origin", "ornate", "orphan", "other", + "needle", "needy", "negate", "neon", "nepal", "nephew", "nerve", + "nest", "neural", "never", "newark", "newly", "next", "nice", + "nicely", "niche", "nickel", "niece", "night", "nile", "nimble", + "nine", "ninety", "ninth", "nobel", "noble", "nobody", "node", + "noise", "noisy", "non", "none", "noon", "nor", "norm", "normal", + "north", "norway", "nose", "nosy", "not", "note", "notice", + "notify", "notion", "nought", "noun", "novel", "novice", "now", + "nozzle", "nude", "null", "numb", "number", "nurse", "nylon", + "nymph", "oak", "oasis", "oath", "obese", "obey", "object", + "oblige", "oboe", "obtain", "occult", "occupy", "occur", "ocean", + "octave", "odd", "off", "offend", "offer", "office", "offset", + "often", "ohio", "oil", "oily", "okay", "old", "older", "oldest", + "olive", "omega", "omen", "omit", "once", "one", "onion", "only", + "onset", "onto", "onus", "onward", "opaque", "open", "openly", + "opera", "opium", "oppose", "optic", "option", "oracle", "oral", + "orange", "orbit", "orchid", "ordeal", "order", "organ", "orgasm", + "orient", "origin", "ornate", "orphan", "oscar", "oslo", "other", "otter", "ought", "ounce", "our", "out", "outer", "output", "outset", "oval", "oven", "over", "overt", "owe", "owing", "owl", - "own", "owner", "oxide", "oxygen", "oyster", "ozone", "pace", - "oxford", "nerve", "nest", "neural", "never", "newly", "next", - "pack", "packet", "pact", "paddle", "paddy", "pagan", "page", - "paid", "pain", "paint", "pair", "palace", "pale", "palm", "panel", - "panic", "panama", "paris", "pascal", "paul", "peking", "peru", - "parade", "parcel", "pardon", "parent", "parish", "park", "parody", - "parrot", "part", "partly", "party", "pass", "past", "paste", - "pastel", "pastor", "pastry", "pat", "patch", "patent", "path", - "patio", "patrol", "patron", "pause", "pave", "pawn", "pay", - "peace", "peach", "peak", "pear", "pearl", "pedal", "peel", "peer", - "pelvic", "pelvis", "pen", "penal", "pence", "pencil", "penis", - "penny", "people", "pepper", "per", "perch", "peril", "period", - "perish", "permit", "person", "pest", "petite", "petrol", "petty", - "peter", "philip", "poland", "polish", "papa", "papal", "paper", - "phase", "phone", "photo", "phrase", "piano", "pick", "picket", - "picnic", "pie", "piece", "pier", "pierce", "piety", "pig", - "pigeon", "piggy", "pike", "pile", "pill", "pillar", "pillow", - "pilot", "pin", "pinch", "pine", "pink", "pint", "pious", "pipe", - "pirate", "piss", "pistol", "piston", "pit", "pitch", "pity", - "pivot", "pixel", "pizza", "place", "placid", "plague", "plain", - "plan", "plane", "planet", "plank", "plant", "plasma", "plate", - "play", "player", "plea", "plead", "please", "pledge", "plenty", - "plenum", "plight", "plot", "ploy", "plug", "plum", "plump", - "plunge", "plural", "plus", "plush", "pocket", "poem", "poet", - "poetic", "poetry", "point", "poison", "polar", "pole", "police", - "policy", "polite", "poll", "pollen", "polo", "pond", "ponder", - "pony", "pool", "poor", "poorly", "pop", "pope", "poppy", "pore", - "pork", "port", "portal", "pose", "posh", "post", "postal", "pot", - "potato", "potent", "pouch", "pound", "pour", "powder", "power", - "prague", "quebec", "rex", "rhine", "ritz", "robert", "roman", - "praise", "pray", "prayer", "preach", "prefer", "prefix", "press", - "primal", "prime", "prince", "print", "prior", "prism", "prison", - "privy", "prize", "probe", "profit", "prompt", "prone", "proof", - "propel", "proper", "prose", "proton", "proud", "prove", "proven", - "proxy", "prune", "psalm", "pseudo", "psyche", "pub", "public", - "puff", "pull", "pulp", "pulpit", "pulsar", "pulse", "pump", - "punch", "punish", "punk", "pupil", "puppet", "puppy", "pure", - "purely", "purge", "purify", "purple", "purse", "pursue", "push", - "pushy", "pussy", "put", "putt", "puzzle", "quaint", "quake", - "quarry", "quartz", "quay", "queen", "queer", "query", "quest", + "own", "owner", "oxford", "oxide", "oxygen", "oyster", "ozone", + "pace", "pack", "packet", "pact", "paddle", "paddy", "pagan", + "page", "paid", "pain", "paint", "pair", "palace", "pale", "palm", + "panama", "panel", "panic", "papa", "papal", "paper", "parade", + "parcel", "pardon", "parent", "paris", "parish", "park", "parody", + "parrot", "part", "partly", "party", "pascal", "pass", "past", + "paste", "pastel", "pastor", "pastry", "pat", "patch", "patent", + "path", "patio", "patrol", "patron", "paul", "pause", "pave", + "pawn", "pay", "peace", "peach", "peak", "pear", "pearl", "pedal", + "peel", "peer", "peking", "pelvic", "pelvis", "pen", "penal", + "pence", "pencil", "penis", "penny", "people", "pepper", "per", + "perch", "peril", "period", "perish", "permit", "person", "peru", + "pest", "peter", "petite", "petrol", "petty", "phase", "philip", + "phone", "photo", "phrase", "piano", "pick", "picket", "picnic", + "pie", "piece", "pier", "pierce", "piety", "pig", "pigeon", + "piggy", "pike", "pile", "pill", "pillar", "pillow", "pilot", + "pin", "pinch", "pine", "pink", "pint", "pious", "pipe", "pirate", + "piss", "pistol", "piston", "pit", "pitch", "pity", "pivot", + "pixel", "pizza", "place", "placid", "plague", "plain", "plan", + "plane", "planet", "plank", "plant", "plasma", "plate", "play", + "player", "plea", "plead", "please", "pledge", "plenty", "plenum", + "plight", "plot", "ploy", "plug", "plum", "plump", "plunge", + "plural", "plus", "plush", "pocket", "poem", "poet", "poetic", + "poetry", "point", "poison", "poland", "polar", "pole", "police", + "policy", "polish", "polite", "poll", "pollen", "polo", "pond", + "ponder", "pony", "pool", "poor", "poorly", "pop", "pope", "poppy", + "pore", "pork", "port", "portal", "pose", "posh", "post", "postal", + "pot", "potato", "potent", "pouch", "pound", "pour", "powder", + "power", "prague", "praise", "pray", "prayer", "preach", "prefer", + "prefix", "press", "pretty", "price", "pride", "priest", "primal", + "prime", "prince", "print", "prior", "prism", "prison", "privy", + "prize", "probe", "profit", "prompt", "prone", "proof", "propel", + "proper", "prose", "proton", "proud", "prove", "proven", "proxy", + "prune", "psalm", "pseudo", "psyche", "pub", "public", "puff", + "pull", "pulp", "pulpit", "pulsar", "pulse", "pump", "punch", + "punish", "punk", "pupil", "puppet", "puppy", "pure", "purely", + "purge", "purify", "purple", "purse", "pursue", "push", "pushy", + "pussy", "put", "putt", "puzzle", "quaint", "quake", "quarry", + "quartz", "quay", "quebec", "queen", "queer", "query", "quest", "queue", "quick", "quid", "quiet", "quilt", "quirk", "quit", "quite", "quiver", "quiz", "quota", "quote", "rabbit", "race", "racial", "racism", "rack", "racket", "radar", "radio", "radish", @@ -510,167 +509,167 @@ pub const WORD_LIST: &[&str] = &[ "repeat", "repent", "reply", "report", "rescue", "resent", "reside", "resign", "resin", "resist", "resort", "rest", "result", "resume", "retail", "retain", "retina", "retire", "return", - "reveal", "review", "revise", "revive", "revolt", "reward", - "rhino", "rhyme", "rhythm", "ribbon", "rice", "rich", "rick", - "rid", "ride", "rider", "ridge", "rife", "rifle", "rift", "right", - "rigid", "ring", "rinse", "riot", "ripe", "ripen", "ripple", - "rise", "risk", "risky", "rite", "ritual", "rival", "river", - "road", "roar", "roast", "rob", "robe", "robin", "robot", "robust", - "rock", "rocket", "rocky", "rod", "rode", "rodent", "rogue", - "role", "roll", "roof", "room", "root", "rope", "rose", "rosy", - "rome", "rosa", "russia", "pretty", "price", "pride", "priest", - "rotate", "rotor", "rotten", "rouge", "rough", "round", "route", - "rover", "row", "royal", "rubble", "ruby", "rudder", "rude", - "rugby", "ruin", "rule", "ruler", "rumble", "rump", "run", "rune", - "rung", "runway", "rural", "rush", "rust", "rustic", "rusty", - "sack", "sacred", "sad", "saddle", "sadism", "sadly", "safari", - "safe", "safely", "safer", "safety", "saga", "sage", "said", + "reveal", "review", "revise", "revive", "revolt", "reward", "rex", + "rhine", "rhino", "rhyme", "rhythm", "ribbon", "rice", "rich", + "rick", "rid", "ride", "rider", "ridge", "rife", "rifle", "rift", + "right", "rigid", "ring", "rinse", "riot", "ripe", "ripen", + "ripple", "rise", "risk", "risky", "rite", "ritual", "ritz", + "rival", "river", "road", "roar", "roast", "rob", "robe", "robert", + "robin", "robot", "robust", "rock", "rocket", "rocky", "rod", + "rode", "rodent", "rogue", "role", "roll", "roman", "rome", "roof", + "room", "root", "rope", "rosa", "rose", "rosy", "rotate", "rotor", + "rotten", "rouge", "rough", "round", "route", "rover", "row", + "royal", "rubble", "ruby", "rudder", "rude", "rugby", "ruin", + "rule", "ruler", "rumble", "rump", "run", "rune", "rung", "runway", + "rural", "rush", "russia", "rust", "rustic", "rusty", "sack", + "sacred", "sad", "saddle", "sadism", "sadly", "safari", "safe", + "safely", "safer", "safety", "saga", "sage", "sahara", "said", "sail", "sailor", "saint", "sake", "salad", "salary", "sale", - "saline", "sahara", "sam", "saturn", "saudi", "saxon", "scot", - "salt", "salty", "salute", "same", "sample", "sand", "sandy", - "sane", "sash", "satan", "satin", "satire", "sauce", "sauna", - "savage", "save", "say", "scale", "scalp", "scan", "scant", "scar", + "saline", "saliva", "salmon", "saloon", "salt", "salty", "salute", + "sam", "same", "sample", "sand", "sandy", "sane", "sash", "satan", + "satin", "satire", "saturn", "sauce", "saudi", "sauna", "savage", + "save", "saxon", "say", "scale", "scalp", "scan", "scant", "scar", "scarce", "scare", "scarf", "scary", "scene", "scenic", "scent", - "school", "scope", "score", "scorn", "scotch", "scout", "scrap", - "scream", "screen", "screw", "script", "scroll", "scrub", "scum", - "sea", "seal", "seam", "seaman", "search", "season", "seat", - "second", "secret", "sect", "sector", "secure", "see", "seed", - "seeing", "seek", "seem", "seize", "seldom", "select", "self", - "sell", "seller", "semi", "senate", "send", "senile", "senior", - "sense", "sensor", "sent", "sentry", "sequel", "serene", "serial", - "seoul", "somali", "sony", "soviet", "saliva", "salmon", "saloon", - "series", "sermon", "serum", "serve", "server", "set", "settle", - "seven", "severe", "sewage", "sex", "sexual", "sexy", "shabby", - "shade", "shadow", "shady", "shaft", "shaggy", "shah", "shake", - "shaky", "shall", "sham", "shame", "shape", "share", "shark", - "sharp", "shawl", "she", "shear", "sheen", "sheep", "sheer", - "sheet", "shelf", "shell", "sherry", "shield", "shift", "shine", - "shiny", "ship", "shire", "shirt", "shit", "shiver", "shock", - "shoe", "shook", "shoot", "shop", "shore", "short", "shot", - "should", "shout", "show", "shower", "shrank", "shrewd", "shrill", - "shrimp", "shrine", "shrink", "shrub", "shrug", "shut", "shy", - "shyly", "sick", "side", "siege", "sigh", "sight", "sigma", "sign", - "signal", "silent", "silk", "silken", "silky", "sill", "silly", - "silver", "simple", "simply", "since", "sinful", "sing", "singer", - "single", "sink", "sir", "siren", "sister", "sit", "site", "six", - "sixth", "sixty", "size", "sketch", "skill", "skin", "skinny", - "skip", "skirt", "skull", "sky", "slab", "slack", "slain", "slam", - "slang", "slap", "slate", "slater", "slave", "sleek", "sleep", - "sleepy", "sleeve", "slice", "slick", "slid", "slide", "slight", - "slim", "slimy", "sling", "slip", "slit", "slogan", "slope", - "sloppy", "slot", "slow", "slowly", "slug", "slum", "slump", - "smack", "small", "smart", "smash", "smear", "smell", "smelly", - "smelt", "smile", "smoke", "smoky", "smooth", "smug", "snack", - "snail", "snake", "snap", "snatch", "sneak", "snow", "snowy", - "snug", "soak", "soap", "sober", "soccer", "social", "sock", - "socket", "soda", "sodden", "sodium", "sofa", "soft", "soften", - "softly", "soggy", "soil", "solar", "sold", "sole", "solely", - "solemn", "solid", "solo", "solve", "some", "son", "sonar", - "sonata", "song", "sonic", "soon", "sooner", "soot", "soothe", - "sordid", "sore", "sorrow", "sorry", "sort", "soul", "sound", - "soup", "sour", "source", "space", "spade", "span", "spare", - "spark", "spain", "stalin", "sudan", "suez", "sunday", "sweden", - "spate", "speak", "spear", "speech", "speed", "speedy", "spell", - "spend", "sperm", "sphere", "spice", "spicy", "spider", "spiky", - "spill", "spin", "spinal", "spine", "spiral", "spirit", "spit", - "spite", "splash", "split", "spoil", "spoke", "sponge", "spoon", - "sport", "spot", "spouse", "spray", "spread", "spree", "spring", - "sprint", "spur", "squad", "square", "squash", "squat", "squid", - "stab", "stable", "stack", "staff", "stage", "stain", "stair", - "stake", "stale", "stall", "stamp", "stance", "stand", "staple", - "star", "starch", "stare", "stark", "start", "starve", "state", - "static", "statue", "status", "stay", "stead", "steady", "steak", - "steal", "steam", "steel", "steep", "steer", "stem", "stench", - "step", "stereo", "stern", "stew", "stick", "sticky", "stiff", - "stifle", "stigma", "still", "sting", "stint", "stir", "stitch", - "stock", "stocky", "stone", "stony", "stool", "stop", "store", - "storm", "stormy", "story", "stout", "stove", "strain", "strait", - "strand", "strap", "strata", "straw", "stray", "streak", "stream", - "street", "stress", "strict", "stride", "strife", "strike", - "string", "strip", "strive", "stroke", "stroll", "strong", "stud", - "studio", "study", "stuff", "stuffy", "stunt", "stupid", "sturdy", - "style", "submit", "subtle", "subtly", "suburb", "such", "suck", - "sudden", "sue", "suffer", "sugar", "suit", "suite", "suitor", - "sullen", "sultan", "sum", "summer", "summit", "summon", "sun", + "school", "scope", "score", "scorn", "scot", "scotch", "scout", + "scrap", "scream", "screen", "screw", "script", "scroll", "scrub", + "scum", "sea", "seal", "seam", "seaman", "search", "season", + "seat", "second", "secret", "sect", "sector", "secure", "see", + "seed", "seeing", "seek", "seem", "seize", "seldom", "select", + "self", "sell", "seller", "semi", "senate", "send", "senile", + "senior", "sense", "sensor", "sent", "sentry", "seoul", "sequel", + "serene", "serial", "series", "sermon", "serum", "serve", "server", + "set", "settle", "seven", "severe", "sewage", "sex", "sexual", + "sexy", "shabby", "shade", "shadow", "shady", "shaft", "shaggy", + "shah", "shake", "shaky", "shall", "sham", "shame", "shape", + "share", "shark", "sharp", "shawl", "she", "shear", "sheen", + "sheep", "sheer", "sheet", "shelf", "shell", "sherry", "shield", + "shift", "shine", "shiny", "ship", "shire", "shirt", "shit", + "shiver", "shock", "shoe", "shook", "shoot", "shop", "shore", + "short", "shot", "should", "shout", "show", "shower", "shrank", + "shrewd", "shrill", "shrimp", "shrine", "shrink", "shrub", "shrug", + "shut", "shy", "shyly", "sick", "side", "siege", "sigh", "sight", + "sigma", "sign", "signal", "silent", "silk", "silken", "silky", + "sill", "silly", "silver", "simple", "simply", "since", "sinful", + "sing", "singer", "single", "sink", "sir", "siren", "sister", + "sit", "site", "six", "sixth", "sixty", "size", "sketch", "skill", + "skin", "skinny", "skip", "skirt", "skull", "sky", "slab", "slack", + "slain", "slam", "slang", "slap", "slate", "slater", "slave", + "sleek", "sleep", "sleepy", "sleeve", "slice", "slick", "slid", + "slide", "slight", "slim", "slimy", "sling", "slip", "slit", + "slogan", "slope", "sloppy", "slot", "slow", "slowly", "slug", + "slum", "slump", "smack", "small", "smart", "smash", "smear", + "smell", "smelly", "smelt", "smile", "smoke", "smoky", "smooth", + "smug", "snack", "snail", "snake", "snap", "snatch", "sneak", + "snow", "snowy", "snug", "soak", "soap", "sober", "soccer", + "social", "sock", "socket", "soda", "sodden", "sodium", "sofa", + "soft", "soften", "softly", "soggy", "soil", "solar", "sold", + "sole", "solely", "solemn", "solid", "solo", "solve", "somali", + "some", "son", "sonar", "sonata", "song", "sonic", "sony", "soon", + "sooner", "soot", "soothe", "sordid", "sore", "sorrow", "sorry", + "sort", "soul", "sound", "soup", "sour", "source", "soviet", + "space", "spade", "spain", "span", "spare", "spark", "sparse", + "spasm", "spat", "spate", "speak", "spear", "speech", "speed", + "speedy", "spell", "spend", "sperm", "sphere", "spice", "spicy", + "spider", "spiky", "spill", "spin", "spinal", "spine", "spiral", + "spirit", "spit", "spite", "splash", "split", "spoil", "spoke", + "sponge", "spoon", "sport", "spot", "spouse", "spray", "spread", + "spree", "spring", "sprint", "spur", "squad", "square", "squash", + "squat", "squid", "stab", "stable", "stack", "staff", "stage", + "stain", "stair", "stake", "stale", "stalin", "stall", "stamp", + "stance", "stand", "staple", "star", "starch", "stare", "stark", + "start", "starve", "state", "static", "statue", "status", "stay", + "stead", "steady", "steak", "steal", "steam", "steel", "steep", + "steer", "stem", "stench", "step", "stereo", "stern", "stew", + "stick", "sticky", "stiff", "stifle", "stigma", "still", "sting", + "stint", "stir", "stitch", "stock", "stocky", "stone", "stony", + "stool", "stop", "store", "storm", "stormy", "story", "stout", + "stove", "strain", "strait", "strand", "strap", "strata", "straw", + "stray", "streak", "stream", "street", "stress", "strict", + "stride", "strife", "strike", "string", "strip", "strive", + "stroke", "stroll", "strong", "stud", "studio", "study", "stuff", + "stuffy", "stunt", "stupid", "sturdy", "style", "submit", "subtle", + "subtly", "suburb", "such", "suck", "sudan", "sudden", "sue", + "suez", "suffer", "sugar", "suit", "suite", "suitor", "sullen", + "sultan", "sum", "summer", "summit", "summon", "sun", "sunday", "sunny", "sunset", "super", "superb", "supper", "supple", "supply", "sure", "surely", "surf", "surge", "survey", "suture", "swamp", "swan", "swap", "swarm", "sway", "swear", "sweat", "sweaty", - "sweep", "sweet", "swell", "swift", "swim", "swine", "swing", - "swirl", "switch", "sword", "swore", "symbol", "synod", "syntax", - "swiss", "sydney", "syria", "taiwan", "sparse", "spasm", "spat", - "syrup", "system", "table", "tablet", "taboo", "tacit", "tackle", - "tact", "tactic", "tail", "tailor", "take", "tale", "talent", - "talk", "tall", "tally", "tame", "tandem", "tangle", "tank", "tap", - "tape", "target", "tariff", "tart", "task", "taste", "tarzan", - "taurus", "tehran", "teresa", "texas", "thomas", "tibet", "tokyo", - "tea", "teach", "teak", "team", "tear", "tease", "tech", "teeth", - "tell", "temper", "temple", "tempo", "tempt", "ten", "tenant", - "tend", "tender", "tendon", "tennis", "tenor", "tense", "tensor", - "tent", "tenth", "tenure", "term", "terror", "test", "text", - "than", "thank", "that", "the", "their", "them", "theme", "then", - "thence", "theory", "there", "these", "thesis", "they", "thick", - "thief", "thigh", "thin", "thing", "think", "third", "thirst", - "thirty", "this", "thorn", "those", "though", "thread", "threat", - "three", "thrill", "thrive", "throat", "throne", "throng", "throw", - "thrust", "thud", "thug", "thumb", "thus", "thyme", "tick", - "ticket", "tidal", "tide", "tidy", "tie", "tier", "tiger", "tight", - "tile", "till", "tilt", "timber", "time", "timid", "tin", "tiny", - "tip", "tissue", "title", "toad", "toast", "today", "toilet", - "token", "told", "toll", "tomato", "tomb", "tonal", "tone", - "tom", "turk", "tasty", "tattoo", "taut", "tavern", "tax", "taxi", - "tongue", "tonic", "too", "took", "tool", "tooth", "top", "topaz", - "topic", "torch", "torque", "torso", "tort", "toss", "total", - "touch", "tough", "tour", "toward", "towel", "tower", "town", - "toxic", "toxin", "trace", "track", "tract", "trade", "tragic", - "trail", "train", "trait", "tram", "trance", "trap", "trauma", - "travel", "tray", "tread", "treat", "treaty", "treble", "tree", - "trek", "tremor", "trench", "trend", "trendy", "trial", "tribal", - "tribe", "trick", "tricky", "tried", "trifle", "trim", "trio", - "trip", "triple", "troop", "trophy", "trot", "trough", "trout", - "truce", "truck", "true", "truly", "trunk", "trust", "truth", - "try", "tsar", "tube", "tumble", "tuna", "tundra", "tune", "tung", - "tunic", "tunnel", "turban", "turf", "turn", "turtle", "tutor", - "tweed", "twelve", "turkey", "uganda", "venice", "venus", "vienna", - "twin", "twist", "two", "tycoon", "tying", "type", "tyrant", - "ugly", "ulcer", "ultra", "umpire", "unable", "uncle", "under", - "uneasy", "unfair", "unify", "union", "unique", "unit", "unite", - "unity", "unlike", "unrest", "unruly", "until", "update", "upheld", + "sweden", "sweep", "sweet", "swell", "swift", "swim", "swine", + "swing", "swirl", "swiss", "switch", "sword", "swore", "sydney", + "symbol", "synod", "syntax", "syria", "syrup", "system", "table", + "tablet", "taboo", "tacit", "tackle", "tact", "tactic", "tail", + "tailor", "taiwan", "take", "tale", "talent", "talk", "tall", + "tally", "tame", "tandem", "tangle", "tank", "tap", "tape", + "target", "tariff", "tart", "tarzan", "task", "taste", "tasty", + "tattoo", "taurus", "taut", "tavern", "tax", "taxi", "tea", + "teach", "teak", "team", "tear", "tease", "tech", "teeth", + "tehran", "tell", "temper", "temple", "tempo", "tempt", "ten", + "tenant", "tend", "tender", "tendon", "tennis", "tenor", "tense", + "tensor", "tent", "tenth", "tenure", "teresa", "term", "terror", + "test", "texas", "text", "than", "thank", "that", "the", "their", + "them", "theme", "then", "thence", "theory", "there", "these", + "thesis", "they", "thick", "thief", "thigh", "thin", "thing", + "think", "third", "thirst", "thirty", "this", "thomas", "thorn", + "those", "though", "thread", "threat", "three", "thrill", "thrive", + "throat", "throne", "throng", "throw", "thrust", "thud", "thug", + "thumb", "thus", "thyme", "tibet", "tick", "ticket", "tidal", + "tide", "tidy", "tie", "tier", "tiger", "tight", "tile", "till", + "tilt", "timber", "time", "timid", "tin", "tiny", "tip", "tissue", + "title", "toad", "toast", "today", "toilet", "token", "tokyo", + "told", "toll", "tom", "tomato", "tomb", "tonal", "tone", "tongue", + "tonic", "too", "took", "tool", "tooth", "top", "topaz", "topic", + "torch", "torque", "torso", "tort", "toss", "total", "touch", + "tough", "tour", "toward", "towel", "tower", "town", "toxic", + "toxin", "trace", "track", "tract", "trade", "tragic", "trail", + "train", "trait", "tram", "trance", "trap", "trauma", "travel", + "tray", "tread", "treat", "treaty", "treble", "tree", "trek", + "tremor", "trench", "trend", "trendy", "trial", "tribal", "tribe", + "trick", "tricky", "tried", "trifle", "trim", "trio", "trip", + "triple", "troop", "trophy", "trot", "trough", "trout", "truce", + "truck", "true", "truly", "trunk", "trust", "truth", "try", "tsar", + "tube", "tumble", "tuna", "tundra", "tune", "tung", "tunic", + "tunnel", "turban", "turf", "turk", "turkey", "turn", "turtle", + "tutor", "tweed", "twelve", "twenty", "twice", "twin", "twist", + "two", "tycoon", "tying", "type", "tyrant", "uganda", "ugly", + "ulcer", "ultra", "umpire", "unable", "uncle", "under", "uneasy", + "unfair", "unify", "union", "unique", "unit", "unite", "unity", + "unlike", "unrest", "unruly", "until", "update", "upheld", "uphill", "uphold", "upon", "uproar", "upset", "upshot", "uptake", "upturn", "upward", "urban", "urge", "urgent", "urging", "urine", "usable", "usage", "use", "useful", "user", "usual", "uterus", "utmost", "utter", "vacant", "vacuum", "vagina", "vague", "vain", "valet", "valid", "valley", "value", "valve", "van", "vanish", "vanity", "vary", "vase", "vast", "vat", "vault", "vector", "veil", - "vein", "velvet", "vendor", "veneer", "venom", "vent", "venue", - "verb", "verbal", "verge", "verify", "verity", "verse", "versus", - "very", "vessel", "vest", "veto", "via", "viable", "vicar", "vice", - "victim", "victor", "video", "view", "vigil", "vile", "villa", - "viking", "virgo", "warsaw", "west", "yale", "twenty", "twice", - "vine", "vinyl", "viola", "violet", "violin", "viral", "virgin", - "virtue", "virus", "visa", "vision", "visit", "visual", "vital", - "vivid", "vocal", "vodka", "vogue", "voice", "void", "volley", - "volume", "vomit", "vote", "vowel", "voyage", "vulgar", "wade", - "wage", "waist", "wait", "waiter", "wake", "walk", "walker", - "wall", "wallet", "walnut", "wander", "want", "war", "warden", - "warm", "warmth", "warn", "warp", "wary", "was", "wash", "wasp", + "vein", "velvet", "vendor", "veneer", "venice", "venom", "vent", + "venue", "venus", "verb", "verbal", "verge", "verify", "verity", + "verse", "versus", "very", "vessel", "vest", "veto", "via", + "viable", "vicar", "vice", "victim", "victor", "video", "vienna", + "view", "vigil", "viking", "vile", "villa", "vine", "vinyl", + "viola", "violet", "violin", "viral", "virgin", "virgo", "virtue", + "virus", "visa", "vision", "visit", "visual", "vital", "vivid", + "vocal", "vodka", "vogue", "voice", "void", "volley", "volume", + "vomit", "vote", "vowel", "voyage", "vulgar", "wade", "wage", + "waist", "wait", "waiter", "wake", "walk", "walker", "wall", + "wallet", "walnut", "wander", "want", "war", "warden", "warm", + "warmth", "warn", "warp", "warsaw", "wary", "was", "wash", "wasp", "waste", "watch", "water", "watery", "wave", "way", "weak", "weaken", "wealth", "weapon", "wear", "weary", "wedge", "wee", "weed", "week", "weekly", "weep", "weight", "weird", "well", - "were", "wet", "whale", "wharf", "what", "wheat", "wheel", "when", - "whence", "where", "which", "whiff", "whig", "while", "whim", - "whip", "whisky", "white", "who", "whole", "wholly", "whom", - "whore", "whose", "why", "wide", "widely", "widen", "wider", - "widow", "width", "wife", "wild", "wildly", "wilful", "will", - "willow", "win", "wind", "window", "windy", "wine", "wing", "wink", - "winner", "winter", "wipe", "wire", "wisdom", "wise", "wish", - "wit", "witch", "with", "within", "witty", "wizard", "woke", - "wolf", "wolves", "woman", "womb", "won", "wonder", "wood", + "were", "west", "wet", "whale", "wharf", "what", "wheat", "wheel", + "when", "whence", "where", "which", "whiff", "whig", "while", + "whim", "whip", "whisky", "white", "who", "whole", "wholly", + "whom", "whore", "whose", "why", "wide", "widely", "widen", + "wider", "widow", "width", "wife", "wild", "wildly", "wilful", + "will", "willow", "win", "wind", "window", "windy", "wine", "wing", + "wink", "winner", "winter", "wipe", "wire", "wisdom", "wise", + "wish", "wit", "witch", "with", "within", "witty", "wizard", + "woke", "wolf", "wolves", "woman", "womb", "won", "wonder", "wood", "wooden", "woods", "woody", "wool", "word", "work", "worker", "world", "worm", "worry", "worse", "worst", "worth", "worthy", "would", "wound", "wrap", "wrath", "wreath", "wreck", "wright", "wrist", "writ", "write", "writer", "wrong", "xerox", "yacht", - "yard", "yarn", "yeah", "year", "yeast", "yellow", "yet", "yield", - "yogurt", "yolk", "you", "young", "your", "yemen", "york", "zaire", - "youth", "zeal", "zebra", "zenith", "zero", "zigzag", "zinc", - "zombie", "zone","zurich" + "yale", "yard", "yarn", "yeah", "year", "yeast", "yellow", "yemen", + "yet", "yield", "yogurt", "yolk", "york", "you", "young", "your", + "youth", "zaire", "zeal", "zebra", "zenith", "zero", "zigzag", + "zinc", "zombie", "zone", "zurich", ]; diff --git a/tests/test_lib.rs b/tests/test_lib.rs index 50983eb..1b7e955 100644 --- a/tests/test_lib.rs +++ b/tests/test_lib.rs @@ -33,10 +33,10 @@ mod tests { fn test_words() { let words = Words::new(); let new_words = words.words(); - + assert_eq!(new_words.words.len(), 0); } - + #[test] fn test_default() { let common = Common::default(); diff --git a/tests/test_macros.rs b/tests/test_macros.rs index 40edcdb..4f1c1ce 100644 --- a/tests/test_macros.rs +++ b/tests/test_macros.rs @@ -1,80 +1,115 @@ #[cfg(test)] mod tests { - - // Importing cmn crate and all of its macros + // Importing the cmn crate and all of its macros + use cmn::Common; use cmn::{ - cmn_assert, cmn_contains, cmn_join, cmn_max, cmn_min, - cmn_print, cmn_print_vec, cmn_split, cmn_vec, constants::*, + cmn_assert, cmn_contains, cmn_in_range, cmn_join, cmn_map, + cmn_max, cmn_min, cmn_parse, cmn_print, cmn_print_vec, + cmn_split, cmn_to_num, cmn_vec, constants::*, }; + /// Test that the `cmn_assert!` macro correctly triggers a panic when the argument is false. #[test] #[should_panic(expected = "Assertion failed!")] fn test_cmn_assert_fail() { - // Test that cmn_assert! macro correctly triggers a panic when the argument is false cmn_assert!(false); } + /// Test that the `cmn_assert!` macro does not trigger a panic when the argument is true. #[test] fn test_cmn_assert() { - // Test that cmn_assert! macro does not trigger a panic when the argument is true cmn_assert!(true); } + /// Test that the `cmn_contains!` macro correctly checks if the first string contains the second. + #[test] + fn test_cmn_contains() { + assert!(cmn_contains!("Hello", "H")); + assert!(!cmn_contains!("Hello", "x")); + } + + /// Test that the `cmn_in_range!` macro correctly checks if the value is within the given range. + #[test] + #[allow(clippy::assertions_on_constants)] + fn test_cmn_in_range() { + debug_assert!(cmn_in_range!(5, 0, 10)); + debug_assert!(!cmn_in_range!(15, 0, 10)); + } + + /// Test that the `cmn_join!` macro correctly joins the string arguments together. #[test] fn test_cmn_join() { - // Test that cmn_join! macro correctly joins the string arguments together let s = cmn_join!("Hello", " ", "World"); assert_eq!(s, "Hello World"); } + /// Test that the `cmn_map!` macro correctly creates a HashMap from the given key-value pairs. #[test] - fn test_cmn_min() { - // Test that cmn_min! macro correctly identifies the minimum value among the arguments - assert_eq!(cmn_min!(10, 20, 30), 10); + fn test_cmn_map() { + let map = cmn_map!("foo" => 1, "bar" => 2, "baz" => 3); + assert_eq!(map.get("foo"), Some(&1)); + assert_eq!(map.get("bar"), Some(&2)); + assert_eq!(map.get("baz"), Some(&3)); + assert_eq!(map.get("qux"), None); } + /// Test that the `cmn_max!` macro correctly identifies the maximum value among the arguments. #[test] fn test_cmn_max() { - // Test that cmn_max! macro correctly identifies the maximum value among the arguments assert_eq!(cmn_max!(10, 20, 30), 30); } + /// Test that the `cmn_min!` macro correctly identifies the minimum value among the arguments. + #[test] + fn test_cmn_min() { + assert_eq!(cmn_min!(10, 20, 30), 10); + } + + /// Test that the `cmn_parse!` macro correctly parses the input JSON string into a `Common` instance. + #[test] + fn test_cmn_parse() { + let json = r#"{"words": ["foo", "bar", "baz"]}"#; + let common = cmn_parse!(json).unwrap(); + let words_list = common.words().words_list(); + assert_eq!(words_list, vec!["bar", "baz", "foo"]); + } + + /// Test that the `cmn_print!` macro correctly prints the argument. #[test] fn test_cmn_print() { - // Test that cmn_print! macro correctly prints the argument cmn_print!("Hello, World!"); } + /// Test that the `cmn_print_vec!` macro correctly prints the elements of the vector argument. #[test] fn test_cmn_print_vec() { - // Test that cmn_print_vec! macro correctly prints the elements of the vector argument cmn_print_vec!(&[1, 2, 3]); } + /// Test that the `cmn_split!` macro correctly splits the string argument into a vector of words. #[test] fn test_cmn_split() { - // Test that cmn_split! macro correctly splits the string argument into a vector of words let v = cmn_split!("Hello World"); assert_eq!(v, vec!["Hello", "World"]); } + /// Test that the `cmn_to_num!` macro correctly converts a string to a number. #[test] - fn test_cmn_vec() { - // Test that cmn_vec! macro correctly creates a vector from the arguments - let v = cmn_vec!(1, 2, 3); - assert_eq!(v, &[1, 2, 3]); + fn test_cmn_to_num() { + assert_eq!(cmn_to_num!("42.5"), 42.5); + assert_eq!(cmn_to_num!("invalid"), 0.0); } + /// Test that the `cmn_vec!` macro correctly creates a vector from the arguments. #[test] - fn test_cmn_contains() { - // Test that cmn_contains! macro correctly checks if the first string contains the second - assert!(cmn_contains!("Hello", "H")); - assert!(!cmn_contains!("Hello", "x")); + fn test_cmn_vec() { + let v = cmn_vec!(1, 2, 3); + assert_eq!(v, &[1, 2, 3]); } + /// Test that each constant defined by the `cmn_constants!` macro has the expected value or is not empty. #[test] fn test_cmn_constants() { - // Test that each constant defined by the cmn_constants! macro has the expected value or is not empty assert_eq!( APERY, 1.2020569031595942, "APERY should have a specific value" @@ -151,7 +186,8 @@ mod tests { "PLANCK should have a specific value" ); assert_eq!( - PLANCK_REDUCED, 1.0545718176461565e-34, + PLANCK_REDUCED, + PLANCK / (2.0 * PI), "PLANCK_REDUCED should have a specific value" ); assert_eq!( @@ -185,7 +221,11 @@ mod tests { SQRT5, 2.236_067_977_499_79, "SQRT5 should have a specific value" ); - assert_eq!(TAU, 2.0 * PI, "TAU should have a specific value"); + assert_eq!( + TAU, + 2.0 * std::f64::consts::PI, + "TAU should have a specific value" + ); assert_eq!( VACUUM_PERMEABILITY, 1.25663706212e-6, "VACUUM_PERMEABILITY should have a specific value" diff --git a/tests/test_words.rs b/tests/test_words.rs index 06417c3..d7552b6 100644 --- a/tests/test_words.rs +++ b/tests/test_words.rs @@ -12,22 +12,38 @@ mod tests { } #[test] -fn test_default_words_list_order() { - let words = Words::default(); - let words_list = words.words_list(); - // Checking the first three elements to verify correct initialization and ordering - assert_eq!(words_list.len(), WORD_LIST.len(), "Default words list length should match WORD_LIST length."); - assert_eq!(words_list[0], "aboard", "Check that words list is sorted and starts with the first word."); - assert_eq!(words_list[1], "abode", "Check the second word in the sorted list."); - assert_eq!(words_list[2], "abort", "Check the third word in the sorted list."); -} + fn test_default_words_list_order() { + let words = Words::default(); + let words_list = words.words_list(); + // Checking the first three elements to verify correct initialization and ordering + assert_eq!( + words_list.len(), + WORD_LIST.len(), + "Default words list length should match WORD_LIST length." + ); + assert_eq!(words_list[0], "aboard", "Check that words list is sorted and starts with the first word."); + assert_eq!( + words_list[1], "abode", + "Check the second word in the sorted list." + ); + assert_eq!( + words_list[2], "abort", + "Check the third word in the sorted list." + ); + } #[test] fn test_add_word_and_contains() { let mut words = Words::new(); words.add_word("example"); - assert!(words.contains("example"), "Word 'example' should be found after adding."); - assert!(!words.contains("test"), "Word 'test' should not be found if not added."); + assert!( + words.contains("example"), + "Word 'example' should be found after adding." + ); + assert!( + !words.contains("test"), + "Word 'test' should not be found if not added." + ); } #[test] @@ -44,7 +60,11 @@ fn test_default_words_list_order() { let mut words = Words::new(); words.add_word("duplicate"); words.add_word("duplicate"); - assert_eq!(words.count(), 1, "Duplicates should not increase the count."); + assert_eq!( + words.count(), + 1, + "Duplicates should not increase the count." + ); } #[test] @@ -52,17 +72,32 @@ fn test_default_words_list_order() { let mut words = Words::default(); assert!(!words.words_list().is_empty(), "Words list should not be empty after initialization with default."); words.clear(); - assert!(words.words_list().is_empty(), "Words list should be empty after calling clear()."); + assert!( + words.words_list().is_empty(), + "Words list should be empty after calling clear()." + ); } #[test] fn test_remove_word() { let mut words = Words::new(); words.add_word("remove"); - assert!(words.contains("remove"), "Word 'remove' should be found after adding."); - assert!(words.remove_word("remove"), "remove_word() should return true if the word was removed."); - assert!(!words.contains("remove"), "Word 'remove' should not be found after removal."); - assert!(!words.remove_word("nonexistent"), "remove_word() should return false for a nonexistent word."); + assert!( + words.contains("remove"), + "Word 'remove' should be found after adding." + ); + assert!( + words.remove_word("remove"), + "remove_word() should return true if the word was removed." + ); + assert!( + !words.contains("remove"), + "Word 'remove' should not be found after removal." + ); + assert!( + !words.remove_word("nonexistent"), + "remove_word() should return false for a nonexistent word." + ); } #[test] @@ -72,8 +107,17 @@ fn test_default_words_list_order() { words.add_word("apple"); words.add_word("monkey"); let words_list = words.words_list(); - assert_eq!(words_list[0], "apple", "Words list should be sorted alphabetically."); - assert_eq!(words_list[1], "monkey", "Words list should be sorted alphabetically."); - assert_eq!(words_list[2], "zebra", "Words list should be sorted alphabetically."); + assert_eq!( + words_list[0], "apple", + "Words list should be sorted alphabetically." + ); + assert_eq!( + words_list[1], "monkey", + "Words list should be sorted alphabetically." + ); + assert_eq!( + words_list[2], "zebra", + "Words list should be sorted alphabetically." + ); } -} \ No newline at end of file +}