[[[generate]]] {{{0}}} Write Rust code that implements this function and name it `solution`. Also, write tests for this function. Finally, create 2 files: 1. `src/lib.rs` (contains the implementation of the function and tests) 2. `Cargo.toml` (contains information about the project and dependencies) You need to build this code and run the tests. Formulate the solution in the following format: **Cargo.toml** ```toml Contents of Cargo.toml file ``` **src/lib.rs** ```rust Contents of src/lib.rs file with codes and tests ``` **Build** ```bash Commands for building code with tests (compiling all code and tests, add "--tests" parameter) ``` **Test** ```bash Commands for running tests ``` In the end, there will be 4 blocks: **Cargo.toml**, **src/lib.rs**, **Build**, **Test** [[[rewrite]]] **Cargo.toml** ```toml {{{0}}} ``` **src/lib.rs** ```rust {{{1}}} ``` ```bash {{{2}}} ``` ```console {{{3}}} ``` ```bash {{{4}}} ``` ```console {{{5}}} ``` {{{6}}} Rewrite Rust code that implements this function and name it `solution`. Also, rewrite tests for this function. Finally, create 2 files: 1. `src/lib.rs` (contains the implementation of the function and tests) 2. `Cargo.toml` (contains information about the project and dependencies) You need to build this code and run the tests. Formulate the solution in the following format: **Cargo.toml** ```toml Contents of Cargo.toml file ``` **src/lib.rs** ```rust Contents of src/lib.rs file with codes and tests ``` **Build** ```bash Commands for building code with tests (compiling all code and tests, add "--tests" parameter) ``` **Test** ```bash Commands for running tests ``` In the end, there will be 4 blocks: **Cargo.toml**, **src/lib.rs**, **Build**, **Test**