Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
161 | I don't think you need the &_[..]. https://rust.godbolt.org/z/Wo-vza |
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
161 | Indeed, although it took a compiler upgrade. |
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
161 | For the other ones I think the problem is that it gets the element type from the first element as &Vec<u8>. I think a better approach then creating the wrapper function is doing [vec.as_slice(), b"foobar"].concat(). |
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
161 | I see. So the reason why the code above was accepted is because pattern was already a &[u8], and not a &Vec<u8>. Thanks! |
I don't think you need the &_[..]. https://rust.godbolt.org/z/Wo-vza