diff options
Diffstat (limited to 'src/libstd/env.rs')
| -rw-r--r-- | src/libstd/env.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index ee6a907f616..0521f301321 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -143,6 +143,13 @@ impl Iterator for Vars { fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() } } +#[stable(feature = "std_debug", since = "1.15.0")] +impl fmt::Debug for Vars { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.pad("Vars { .. }") + } +} + #[stable(feature = "env", since = "1.0.0")] impl Iterator for VarsOs { type Item = (OsString, OsString); @@ -150,6 +157,13 @@ impl Iterator for VarsOs { fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() } } +#[stable(feature = "std_debug", since = "1.15.0")] +impl fmt::Debug for VarsOs { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.pad("VarsOs { .. }") + } +} + /// Fetches the environment variable `key` from the current process. /// /// The returned result is `Ok(s)` if the environment variable is present and is @@ -364,6 +378,13 @@ impl<'a> Iterator for SplitPaths<'a> { fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() } } +#[stable(feature = "std_debug", since = "1.15.0")] +impl<'a> fmt::Debug for SplitPaths<'a> { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.pad("SplitPaths { .. }") + } +} + /// Error type returned from `std::env::join_paths` when paths fail to be /// joined. #[derive(Debug)] @@ -640,6 +661,13 @@ impl DoubleEndedIterator for Args { } } +#[stable(feature = "std_debug", since = "1.15.0")] +impl fmt::Debug for Args { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.pad("Args { .. }") + } +} + #[stable(feature = "env", since = "1.0.0")] impl Iterator for ArgsOs { type Item = OsString; @@ -657,6 +685,14 @@ impl ExactSizeIterator for ArgsOs { impl DoubleEndedIterator for ArgsOs { fn next_back(&mut self) -> Option<OsString> { self.inner.next_back() } } + +#[stable(feature = "std_debug", since = "1.15.0")] +impl fmt::Debug for ArgsOs { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.pad("ArgsOs { .. }") + } +} + /// Constants associated with the current target #[stable(feature = "env", since = "1.0.0")] pub mod consts { |
