comparison rust/hg-core/src/utils.rs @ 42956:3fe40dd6355d

rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths This change is a direct consequence of this discussion on the mailing list: https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-August/133574.html The implementations of `HgPath` and `HgPathBuf` are, for the most part, taken directly from `OsStr` and `OsString` respectively from the standard library. What this change does *not* yet do is implement the Windows MBCS to WTF8 conversion, but it lays the basis for a very flexible interface for paths. Differential Revision: https://phab.mercurial-scm.org/D6773
author Raphaël Gomès <rgomes@octobus.net>
date Sun, 01 Sep 2019 20:53:14 +0200
parents 62eabdf91f85
children 191a461d6be6
comparison
equal deleted inserted replaced
42955:9668744c9122 42956:3fe40dd6355d
6 // GNU General Public License version 2 or any later version. 6 // GNU General Public License version 2 or any later version.
7 7
8 //! Contains useful functions, traits, structs, etc. for use in core. 8 //! Contains useful functions, traits, structs, etc. for use in core.
9 9
10 pub mod files; 10 pub mod files;
11 pub mod hg_path;
11 12
12 /// Replaces the `from` slice with the `to` slice inside the `buf` slice. 13 /// Replaces the `from` slice with the `to` slice inside the `buf` slice.
13 /// 14 ///
14 /// # Examples 15 /// # Examples
15 /// 16 ///