pub fn strip_cur_dir(source_path: &Path) -> PathBuf {
    source_path
        .strip_prefix(Component::CurDir)
        .map(|path| path.to_path_buf())
        .unwrap_or_else(|_| source_path.to_path_buf())
}
/// Removes the current dir from the beginning of a path
/// normally used for presentation sake.
/// If this function fails, it will return source path as a PathBuf.
Removes the current dir from the beginning of a path
normally used for presentation sake.
If this function fails, it will return source path as a PathBuf.
Removes the current dir from the beginning of a path normally used for presentation sake . If this function fails it will return source path as a PathBuf .
pub fn strip_cur_dir(source_path: &Path) -> PathBuf {
    source_path
        .strip_prefix(Component::CurDir)
        .map(|path| path.to_path_buf())
        .unwrap_or_else(|_| source_path.to_path_buf())
}
pub fn strip_cur_dir ( source_path : & Path ) -> PathBuf { source_path . strip_prefix ( Component :: CurDir ) . map ( | path | path . to_path_buf ( ) ) . unwrap_or_else ( | _ | source_path . to_path_buf ( ) ) }
Removes the current dir from the beginning of a path
normally used for presentation sake.
Removes the current dir from the beginning of a path normally used for presentation sake .
source_path
&Path
source_path
&Path