about summary refs log tree commit diff
path: root/src/libstd/sys/unix
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-06-22 10:34:21 +0000
committerbors <bors@rust-lang.org>2017-06-22 10:34:21 +0000
commit6f01c84fc8ae1b07d8165ceccb2e432f45a2ff1a (patch)
tree65497205cc0fa9582e0612e82374799752ad36f2 /src/libstd/sys/unix
parent03c8b92dc1c160c86d7ba6f08ee718a5324de136 (diff)
parent275f9a04af6191e3aee3852a5a1713130f635164 (diff)
downloadrust-6f01c84fc8ae1b07d8165ceccb2e432f45a2ff1a.tar.gz
rust-6f01c84fc8ae1b07d8165ceccb2e432f45a2ff1a.zip
Auto merge of #42798 - stepancheg:args-debug, r=sfackler
Better Debug for Args and ArgsOs

Display actual args instead of two dots.
Diffstat (limited to 'src/libstd/sys/unix')
-rw-r--r--src/libstd/sys/unix/args.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/args.rs b/src/libstd/sys/unix/args.rs
index 6e35a472792..bbdcb5d3616 100644
--- a/src/libstd/sys/unix/args.rs
+++ b/src/libstd/sys/unix/args.rs
@@ -35,6 +35,12 @@ pub struct Args {
     _dont_send_or_sync_me: PhantomData<*mut ()>,
 }
 
+impl Args {
+    pub fn inner_debug(&self) -> &[OsString] {
+        self.iter.as_slice()
+    }
+}
+
 impl Iterator for Args {
     type Item = OsString;
     fn next(&mut self) -> Option<OsString> { self.iter.next() }