# HG changeset patch # User Georges Racinet # Date 2023-04-03 14:03:41 # 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 --git a/rust/hg-core/src/utils/hg_path.rs b/rust/hg-core/src/utils/hg_path.rs --- a/rust/hg-core/src/utils/hg_path.rs +++ b/rust/hg-core/src/utils/hg_path.rs @@ -479,10 +479,11 @@ impl Extend for HgPathBuf { } } +/// 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 @@ pub fn hg_path_to_os_string>( 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 @@ pub fn os_string_to_hg_path_buf>( path: P, ) -> Result {