Implement fmt::Debug
for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
This commit is contained in:
parent
1f965cc8e9
commit
86fc63e62d
31 changed files with 515 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue