@@ -100,18 +100,17 @@ mod debug_struct {
100
100
101
101
impl fmt:: Debug for Foo {
102
102
fn fmt ( & self , fmt : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
103
- fmt. debug_struct ( "Foo" )
104
- . finish_non_exhaustive ( )
103
+ fmt. debug_struct ( "Foo" ) . finish_non_exhaustive ( )
105
104
}
106
105
}
107
106
108
-
109
107
assert_eq ! ( "Foo { .. }" , format!( "{:?}" , Foo ) ) ;
110
108
assert_eq ! (
111
- "Foo {
109
+ "Foo {
112
110
..
113
111
}" ,
114
- format!( "{:#?}" , Foo ) ) ;
112
+ format!( "{:#?}" , Foo )
113
+ ) ;
115
114
}
116
115
117
116
#[ test]
@@ -129,12 +128,13 @@ mod debug_struct {
129
128
130
129
assert_eq ! ( "Foo { bar: true, baz: 10/20, .. }" , format!( "{:?}" , Foo ) ) ;
131
130
assert_eq ! (
132
- "Foo {
131
+ "Foo {
133
132
bar: true,
134
133
baz: 10/20,
135
134
..
136
135
}" ,
137
- format!( "{:#?}" , Foo ) ) ;
136
+ format!( "{:#?}" , Foo )
137
+ ) ;
138
138
}
139
139
140
140
#[ test]
@@ -161,10 +161,12 @@ mod debug_struct {
161
161
}
162
162
}
163
163
164
- assert_eq ! ( "Bar { foo: Foo { bar: true, baz: 10/20, .. }, hello: \" world\" , .. }" ,
165
- format!( "{:?}" , Bar ) ) ;
166
164
assert_eq ! (
167
- "Bar {
165
+ "Bar { foo: Foo { bar: true, baz: 10/20, .. }, hello: \" world\" , .. }" ,
166
+ format!( "{:?}" , Bar )
167
+ ) ;
168
+ assert_eq ! (
169
+ "Bar {
168
170
foo: Foo {
169
171
bar: true,
170
172
baz: 10/20,
@@ -173,9 +175,9 @@ mod debug_struct {
173
175
hello: \" world\" ,
174
176
..
175
177
}" ,
176
- format!( "{:#?}" , Bar ) ) ;
178
+ format!( "{:#?}" , Bar )
179
+ ) ;
177
180
}
178
-
179
181
}
180
182
181
183
mod debug_tuple {
0 commit comments