D7864: rust-utils: add Rust implementation of Python's "os.path.splitdrive"

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Wed Jan 15 15:12:13 EST 2020


Alphare added inline comments.

INLINE COMMENTS

> kevincox wrote in files.rs:109
> I would recommend just converting to bytes at the top of the function then converting the return value to a path at the exit. I feel when you are doing manipulation like this it makes the most sense to treat it as plain bytes within the function.
> 
> Alternatively I wouldn't mind putting an index operator but have a slight preference for `path.as_bytes()[n]` to keep it explicit as most of the code shouldn't be reaching into paths.

I agree. I'll send a follow-up for all your remarks in an hour.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7864/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7864

To: Alphare, #hg-reviewers, kevincox
Cc: durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list