D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

Yuya Nishihara yuya at tcha.org
Sat Nov 23 01:11:18 EST 2019


Many unhandled results:

```
warning: unused `std::result::Result` that must be used
  --> hg-core/src/dirstate/dirs_multiset.rs:42:21
   |
42 |                     multiset.add_path(filename);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_must_use)] on by default
   = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `std::result::Result` that must be used
  --> hg-core/src/dirstate/dirs_multiset.rs:45:17
   |
45 |                 multiset.add_path(filename);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `std::result::Result` that must be used
  --> hg-core/src/dirstate/dirs_multiset.rs:59:13
   |
59 |             multiset.add_path(filename);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `std::result::Result` that must be used
   --> hg-core/src/dirstate/dirstate_map.rs:129:17
    |
129 |                 all_dirs.add_path(filename);
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
```

Might be better to do `path.check_state()` in cpython layer, and insert
`debug_assert` to hg-core.


More information about the Mercurial-devel mailing list