aylei / leetcode-rust

my leetcode solutions in rust
Apache License 2.0
723 stars 141 forks source link

fix 26 #28

Closed TianyiShi2001 closed 3 years ago

TianyiShi2001 commented 3 years ago
---- solution::s0026_remove_duplicates_from_sorted_array::tests::test_26 stdout ----
thread 'solution::s0026_remove_duplicates_from_sorted_array::tests::test_26' panicked at 'assertion failed: `(left == right)`
  left: `[1, 3, 1, 1, 3]`,
 right: `[1, 3]`', src/solution/s0026_remove_duplicates_from_sorted_array.rs:81:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Test failed because the vector wasn't truncated to the new size. Fixed this.