D6765: rustfilepatterns: shorter code for concatenating slices

2019-09-05 Thread valentin.gatienbaron (Valentin Gatien-Baron)
Closed by commit rHG406bd21d363b: rustfilepatterns: shorter code for concatenating slices (authored by valentin.gatienbaron). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-28 Thread valentin.gatienbaron (Valentin Gatien-Baron)
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 ``. I think a better approach then

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-28 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron updated this revision to Diff 16330. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6765?vs=16328=16330 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6765/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6765

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-28 Thread kevincox (Kevin Cox)
kevincox added inline comments. INLINE COMMENTS > valentin.gatienbaron wrote in filepatterns.rs:161 > Indeed, although it took a compiler upgrade. > I don't really understand why the compiler accepts the change here but not in > the other places. It seems a bit random to remove the borrow only

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-28 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron added inline comments. INLINE COMMENTS > kevincox wrote in filepatterns.rs:161 > I don't think you need the `&_[..]`. https://rust.godbolt.org/z/Wo-vza Indeed, although it took a compiler upgrade. I don't really understand why the compiler accepts the change here but not in

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-28 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron updated this revision to Diff 16328. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6765?vs=16321=16328 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6765/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6765

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-28 Thread kevincox (Kevin Cox)
kevincox added inline comments. kevincox accepted this revision. INLINE COMMENTS > filepatterns.rs:161 > } > -let mut res = b".*".to_vec(); > -res.extend(pattern); > -res > +[".*"[..], pattern].concat() > } I don't think you

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-26 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron updated this revision to Diff 16321. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6765?vs=16318=16321 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6765/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6765

D6765: rustfilepatterns: shorter code for concatenating slices

2019-08-25 Thread valentin.gatienbaron (Valentin Gatien-Baron)
valentin.gatienbaron created this revision. Herald added subscribers: mercurial-devel, kevincox, durin42. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6765 AFFECTED FILES rust/hg-core/src/filepatterns.rs CHANGE DETAILS