Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
162 | I don't think you need the &_[..]. https://rust.godbolt.org/z/Wo-vza |
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
162 | Indeed, although it took a compiler upgrade. |
rust/hg-core/src/filepatterns.rs | ||
---|---|---|
162 | 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 | ||
---|---|---|
162 | 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