Use DebugStruct::finish_non_exhaustive() in std.

This commit is contained in:
Mara Bos 2021-03-27 13:29:23 +01:00
parent feaac19f17
commit 2afa4cc958
8 changed files with 21 additions and 15 deletions

View file

@ -1176,7 +1176,10 @@ impl Thread {
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for Thread {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Thread").field("id", &self.id()).field("name", &self.name()).finish()
f.debug_struct("Thread")
.field("id", &self.id())
.field("name", &self.name())
.finish_non_exhaustive()
}
}