Константин качи първо решение на 11.01.2022 14:15 (преди над 3 години)
Кода ти не се компилира, липсват ти функции от условието. Ако няма да ги имплементираш, сложи ги в решението си както са дадени.
Към профила на Константин Константинов
Compiling solution v0.1.0 (/tmp/d20220116-3533338-otof74/solution) warning: unused variable: `reader` --> src/lib.rs:79:36 | 79 | pub fn from_reader<B: BufRead>(reader: B) -> Result<Self, Errors> { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_reader` | = note: `#[warn(unused_variables)]` on by default warning: unused variable: `start_room_name` --> src/lib.rs:83:29 | 83 | pub fn find_path(&self, start_room_name: &str, end_room_name: &str) -> Result<Option<Vec<&Room>>, Errors> { | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_start_room_name` warning: unused variable: `end_room_name` --> src/lib.rs:83:52 | 83 | pub fn find_path(&self, start_room_name: &str, end_room_name: &str) -> Result<Option<Vec<&Room>>, Errors> { | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_end_room_name` warning: `solution` (lib) generated 3 warnings Finished test [unoptimized + debuginfo] target(s) in 3.38s Running tests/solution_test.rs (target/debug/deps/solution_test-2e292b23ac75572c) running 15 tests test solution_test::test_adding_rooms_1 ... ok test solution_test::test_adding_rooms_2 ... ok test solution_test::test_cyrillic_room_names ... ok test solution_test::test_finding_a_direct_path ... FAILED test solution_test::test_finding_a_reflexive_path ... FAILED test solution_test::test_finding_an_indirect_path ... FAILED test solution_test::test_finding_no_path ... FAILED test solution_test::test_invalid_parsing ... FAILED test solution_test::test_io_error ... FAILED test solution_test::test_overwriting_a_room_link ... ok test solution_test::test_parsing_cyrillic_rooms ... FAILED test solution_test::test_parsing_no_rooms_or_links ... FAILED test solution_test::test_parsing_rooms ... FAILED test solution_test::test_room_errors ... ok test solution_test::test_room_links ... ok failures: ---- solution_test::test_finding_a_direct_path stdout ---- thread '<unnamed>' panicked at 'not yet implemented', src/lib.rs:84:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', tests/solution_test.rs:306:5 ---- solution_test::test_finding_a_reflexive_path stdout ---- thread '<unnamed>' panicked at 'not yet implemented', src/lib.rs:84:9 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', tests/solution_test.rs:354:5 ---- solution_test::test_finding_an_indirect_path stdout ---- thread '<unnamed>' panicked at 'not yet implemented', src/lib.rs:84:9 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', tests/solution_test.rs:320:5 ---- solution_test::test_finding_no_path stdout ---- thread '<unnamed>' panicked at 'not yet implemented', src/lib.rs:84:9 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', tests/solution_test.rs:372:5 ---- solution_test::test_invalid_parsing stdout ---- thread 'main' panicked at 'not yet implemented', /tmp/d20220116-3533338-otof74/solution/src/lib.rs:80:9 ---- solution_test::test_io_error stdout ---- thread '<unnamed>' panicked at 'not yet implemented', /tmp/d20220116-3533338-otof74/solution/src/lib.rs:80:9 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', tests/solution_test.rs:194:5 ---- solution_test::test_parsing_cyrillic_rooms stdout ---- thread 'main' panicked at 'not yet implemented', /tmp/d20220116-3533338-otof74/solution/src/lib.rs:80:9 ---- solution_test::test_parsing_no_rooms_or_links stdout ---- thread 'main' panicked at 'not yet implemented', /tmp/d20220116-3533338-otof74/solution/src/lib.rs:80:9 ---- solution_test::test_parsing_rooms stdout ---- thread 'main' panicked at 'not yet implemented', /tmp/d20220116-3533338-otof74/solution/src/lib.rs:80:9 failures: solution_test::test_finding_a_direct_path solution_test::test_finding_a_reflexive_path solution_test::test_finding_an_indirect_path solution_test::test_finding_no_path solution_test::test_invalid_parsing solution_test::test_io_error solution_test::test_parsing_cyrillic_rooms solution_test::test_parsing_no_rooms_or_links solution_test::test_parsing_rooms test result: FAILED. 6 passed; 9 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s error: test failed, to rerun pass '--test solution_test'
Кода ти не се компилира, липсват ти функции от условието. Ако няма да ги имплементираш, сложи ги в решението си както са дадени.