talent-plan
talent-plan copied to clipboard
Output is different from the given in project_1 part1
I always get the output like this:
error[E0432]: unresolved import `kvs::KvStore`
--> tests/tests.rs:2:5
|
2 | use kvs::KvStore;
| ^^^^^^^^^^^^ no `KvStore` in the root
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
error: Could not compile `kvs`.
To learn more, run the command again with --verbose.
so i can't run the test correctly, when i write nothing in my file.
Hi, I think that is the expected output if the lib.rs file is empty. You need to define the KvStore type in lib.rs
Hi, If you only copy the tests.rs file into tests/ directory.
cargo test will thow the compile error because you haven't define the KvStore struct.
Subsequent content ask you to write the type and method definitions necessary in lib.rs to make cargo test --no-run complete successfully.
So define struct KvStore and relevant method asked by complier to pass cargo test --no-run command