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

@@ -515,7 +515,7 @@ pub struct SyncLazy<T, F = fn() -> T> {
#[unstable(feature = "once_cell", issue = "74465")]
impl<T: fmt::Debug, F> fmt::Debug for SyncLazy<T, F> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Lazy").field("cell", &self.cell).field("init", &"..").finish()
f.debug_struct("Lazy").field("cell", &self.cell).finish_non_exhaustive()
}
}