@@ -15,7 +15,7 @@ use crate::ffi::{OsStr, OsString};
1515use crate :: num:: NonZero ;
1616use crate :: ops:: Try ;
1717use crate :: path:: { Path , PathBuf } ;
18- use crate :: sys:: { env as env_imp, os as os_imp } ;
18+ use crate :: sys:: { env as env_imp, paths as paths_imp } ;
1919use crate :: { array, fmt, io, sys} ;
2020
2121/// Returns the current working directory as a [`PathBuf`].
@@ -51,7 +51,7 @@ use crate::{array, fmt, io, sys};
5151#[ doc( alias = "GetCurrentDirectory" ) ]
5252#[ stable( feature = "env" , since = "1.0.0" ) ]
5353pub fn current_dir ( ) -> io:: Result < PathBuf > {
54- os_imp :: getcwd ( )
54+ paths_imp :: getcwd ( )
5555}
5656
5757/// Changes the current working directory to the specified path.
@@ -78,7 +78,7 @@ pub fn current_dir() -> io::Result<PathBuf> {
7878#[ doc( alias = "chdir" , alias = "SetCurrentDirectory" , alias = "SetCurrentDirectoryW" ) ]
7979#[ stable( feature = "env" , since = "1.0.0" ) ]
8080pub fn set_current_dir < P : AsRef < Path > > ( path : P ) -> io:: Result < ( ) > {
81- os_imp :: chdir ( path. as_ref ( ) )
81+ paths_imp :: chdir ( path. as_ref ( ) )
8282}
8383
8484/// An iterator over a snapshot of the environment variables of this process.
@@ -444,7 +444,7 @@ pub unsafe fn remove_var<K: AsRef<OsStr>>(key: K) {
444444#[ must_use = "iterators are lazy and do nothing unless consumed" ]
445445#[ stable( feature = "env" , since = "1.0.0" ) ]
446446pub struct SplitPaths < ' a > {
447- inner : os_imp :: SplitPaths < ' a > ,
447+ inner : paths_imp :: SplitPaths < ' a > ,
448448}
449449
450450/// Parses input according to platform conventions for the `PATH`
@@ -480,7 +480,7 @@ pub struct SplitPaths<'a> {
480480/// ```
481481#[ stable( feature = "env" , since = "1.0.0" ) ]
482482pub fn split_paths < T : AsRef < OsStr > + ?Sized > ( unparsed : & T ) -> SplitPaths < ' _ > {
483- SplitPaths { inner : os_imp :: split_paths ( unparsed. as_ref ( ) ) }
483+ SplitPaths { inner : paths_imp :: split_paths ( unparsed. as_ref ( ) ) }
484484}
485485
486486#[ stable( feature = "env" , since = "1.0.0" ) ]
@@ -508,7 +508,7 @@ impl fmt::Debug for SplitPaths<'_> {
508508#[ derive( Debug ) ]
509509#[ stable( feature = "env" , since = "1.0.0" ) ]
510510pub struct JoinPathsError {
511- inner : os_imp :: JoinPathsError ,
511+ inner : paths_imp :: JoinPathsError ,
512512}
513513
514514/// Joins a collection of [`Path`]s appropriately for the `PATH`
@@ -579,7 +579,7 @@ where
579579 I : IntoIterator < Item = T > ,
580580 T : AsRef < OsStr > ,
581581{
582- os_imp :: join_paths ( paths. into_iter ( ) ) . map_err ( |e| JoinPathsError { inner : e } )
582+ paths_imp :: join_paths ( paths. into_iter ( ) ) . map_err ( |e| JoinPathsError { inner : e } )
583583}
584584
585585#[ stable( feature = "env" , since = "1.0.0" ) ]
@@ -641,7 +641,7 @@ impl Error for JoinPathsError {
641641#[ must_use]
642642#[ stable( feature = "env" , since = "1.0.0" ) ]
643643pub fn home_dir ( ) -> Option < PathBuf > {
644- os_imp :: home_dir ( )
644+ paths_imp :: home_dir ( )
645645}
646646
647647/// Returns the path of a temporary directory.
@@ -701,7 +701,7 @@ pub fn home_dir() -> Option<PathBuf> {
701701#[ doc( alias = "GetTempPath" , alias = "GetTempPath2" ) ]
702702#[ stable( feature = "env" , since = "1.0.0" ) ]
703703pub fn temp_dir ( ) -> PathBuf {
704- os_imp :: temp_dir ( )
704+ paths_imp :: temp_dir ( )
705705}
706706
707707/// Returns the full filesystem path of the current running executable.
@@ -752,7 +752,7 @@ pub fn temp_dir() -> PathBuf {
752752/// ```
753753#[ stable( feature = "env" , since = "1.0.0" ) ]
754754pub fn current_exe ( ) -> io:: Result < PathBuf > {
755- os_imp :: current_exe ( )
755+ paths_imp :: current_exe ( )
756756}
757757
758758/// An iterator over the arguments of a process, yielding a [`String`] value for
0 commit comments