# HG changeset patch # User Georges Racinet # Date 1680530621 -7200 # Node ID d27b6fc7c1bf31aaed31caf74c67d4767e454d7d # Parent e2c8b30ab4e73e8bb2f9ce42fe33f005e66bcda3 rustdoc: summary line for hg_path_to_os_string The main motivation of this change is to avoid the TODO being the summary line, even though this leads to a pretty obvious summary. Then doc-comments for the other functions are introduced for consistency. diff -r e2c8b30ab4e7 -r d27b6fc7c1bf rust/hg-core/src/utils/hg_path.rs --- a/rust/hg-core/src/utils/hg_path.rs Mon Apr 03 15:58:36 2023 +0200 +++ b/rust/hg-core/src/utils/hg_path.rs Mon Apr 03 16:03:41 2023 +0200 @@ -479,10 +479,11 @@ } } +/// Create a new [`OsString`] from types referenceable as [`HgPath`]. +/// /// TODO: Once is /// implemented, these conversion utils will have to work differently depending /// on the repository encoding: either `UTF-8` or `MBCS`. - pub fn hg_path_to_os_string>( hg_path: P, ) -> Result { @@ -498,12 +499,14 @@ Ok(os_str.to_os_string()) } +/// Create a new [`PathBuf`] from types referenceable as [`HgPath`]. pub fn hg_path_to_path_buf>( hg_path: P, ) -> Result { Ok(Path::new(&hg_path_to_os_string(hg_path)?).to_path_buf()) } +/// Create a new [`HgPathBuf`] from types referenceable as [`OsStr`]. pub fn os_string_to_hg_path_buf>( os_string: S, ) -> Result { @@ -520,6 +523,7 @@ Ok(buf) } +/// Create a new [`HgPathBuf`] from types referenceable as [`Path`]. pub fn path_to_hg_path_buf>( path: P, ) -> Result {