D6765: rustfilepatterns: shorter code for concatenating slices
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Wed Aug 28 07:59:28 EDT 2019
valentin.gatienbaron added inline comments.
valentin.gatienbaron marked 2 inline comments as done.
INLINE COMMENTS
> kevincox wrote in 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()`.
I see. So the reason why the code above was accepted is because `pattern` was already a `&[u8]`, and not a `&Vec<u8>`. Thanks!
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6765/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6765
To: valentin.gatienbaron, #hg-reviewers, Alphare, kevincox
Cc: durin42, kevincox, mercurial-devel
More information about the Mercurial-devel
mailing list