@@ -18,8 +18,8 @@ use crate::ffi::{OsStr, OsString};
1818use crate :: fmt;
1919use crate :: io;
2020use crate :: path:: { Path , PathBuf } ;
21- use crate :: sys;
2221use crate :: sys:: os as os_imp;
22+ use crate :: sys_common;
2323
2424/// Returns the current working directory as a [`PathBuf`].
2525///
@@ -705,7 +705,7 @@ pub struct Args {
705705/// [`env::args_os()`]: args_os
706706#[ stable( feature = "env" , since = "1.0.0" ) ]
707707pub struct ArgsOs {
708- inner : sys :: args:: Args ,
708+ inner : sys_common :: args:: Args ,
709709}
710710
711711/// Returns the arguments that this program was started with (normally passed
@@ -777,7 +777,7 @@ pub fn args() -> Args {
777777/// ```
778778#[ stable( feature = "env" , since = "1.0.0" ) ]
779779pub fn args_os ( ) -> ArgsOs {
780- ArgsOs { inner : sys :: args:: args ( ) }
780+ ArgsOs { inner : sys_common :: args:: Args :: get ( ) }
781781}
782782
783783#[ stable( feature = "env_unimpl_send_sync" , since = "1.26.0" ) ]
@@ -817,8 +817,7 @@ impl DoubleEndedIterator for Args {
817817#[ stable( feature = "std_debug" , since = "1.16.0" ) ]
818818impl fmt:: Debug for Args {
819819 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
820- let args = & AsRef :: < [ OsString ] > :: as_ref ( & self . inner . inner ) ;
821- f. debug_struct ( "Args" ) . field ( "inner" , args) . finish ( )
820+ f. debug_struct ( "Args" ) . field ( "inner" , & self . inner . inner ) . finish ( )
822821 }
823822}
824823
@@ -859,8 +858,7 @@ impl DoubleEndedIterator for ArgsOs {
859858#[ stable( feature = "std_debug" , since = "1.16.0" ) ]
860859impl fmt:: Debug for ArgsOs {
861860 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
862- let args = & AsRef :: < [ OsString ] > :: as_ref ( & self . inner ) ;
863- f. debug_struct ( "ArgsOs" ) . field ( "inner" , args) . finish ( )
861+ f. debug_struct ( "ArgsOs" ) . field ( "inner" , & self . inner ) . finish ( )
864862 }
865863}
866864
0 commit comments