@@ -188,38 +188,38 @@ impl Shape {
188
188
}
189
189
}
190
190
191
- pub ( crate ) fn visual_indent ( & self , extra_width : usize ) -> Shape {
192
- let alignment = self . offset + extra_width ;
191
+ pub ( crate ) fn visual_indent ( & self , delta : usize ) -> Shape {
192
+ let alignment = self . offset + delta ;
193
193
Shape {
194
194
width : self . width ,
195
195
indent : Indent :: new ( self . indent . block_indent , alignment) ,
196
196
offset : alignment,
197
197
}
198
198
}
199
199
200
- pub ( crate ) fn block_indent ( & self , extra_width : usize ) -> Shape {
200
+ pub ( crate ) fn block_indent ( & self , delta : usize ) -> Shape {
201
201
if self . indent . alignment == 0 {
202
202
Shape {
203
203
width : self . width ,
204
- indent : Indent :: new ( self . indent . block_indent + extra_width , 0 ) ,
204
+ indent : Indent :: new ( self . indent . block_indent + delta , 0 ) ,
205
205
offset : 0 ,
206
206
}
207
207
} else {
208
208
Shape {
209
209
width : self . width ,
210
- indent : self . indent + extra_width ,
211
- offset : self . indent . alignment + extra_width ,
210
+ indent : self . indent + delta ,
211
+ offset : self . indent . alignment + delta ,
212
212
}
213
213
}
214
214
}
215
215
216
- pub ( crate ) fn block_left ( & self , width : usize ) -> Option < Shape > {
217
- self . block_indent ( width ) . sub_width ( width )
216
+ pub ( crate ) fn block_left ( & self , delta : usize ) -> Option < Shape > {
217
+ self . block_indent ( delta ) . sub_width ( delta )
218
218
}
219
219
220
- pub ( crate ) fn add_offset ( & self , extra_width : usize ) -> Shape {
220
+ pub ( crate ) fn add_offset ( & self , delta : usize ) -> Shape {
221
221
Shape {
222
- offset : self . offset + extra_width ,
222
+ offset : self . offset + delta ,
223
223
..* self
224
224
}
225
225
}
@@ -231,27 +231,27 @@ impl Shape {
231
231
}
232
232
}
233
233
234
- pub ( crate ) fn saturating_sub_width ( & self , width : usize ) -> Shape {
235
- self . sub_width ( width ) . unwrap_or ( Shape { width : 0 , ..* self } )
234
+ pub ( crate ) fn saturating_sub_width ( & self , delta : usize ) -> Shape {
235
+ self . sub_width ( delta ) . unwrap_or ( Shape { width : 0 , ..* self } )
236
236
}
237
237
238
- pub ( crate ) fn sub_width ( & self , width : usize ) -> Option < Shape > {
238
+ pub ( crate ) fn sub_width ( & self , n : usize ) -> Option < Shape > {
239
239
Some ( Shape {
240
- width : self . width . checked_sub ( width ) ?,
240
+ width : self . width . checked_sub ( n ) ?,
241
241
..* self
242
242
} )
243
243
}
244
244
245
- pub ( crate ) fn shrink_left ( & self , width : usize ) -> Option < Shape > {
245
+ pub ( crate ) fn shrink_left ( & self , delta : usize ) -> Option < Shape > {
246
246
Some ( Shape {
247
- width : self . width . checked_sub ( width ) ?,
248
- indent : self . indent + width ,
249
- offset : self . offset + width ,
247
+ width : self . width . checked_sub ( delta ) ?,
248
+ indent : self . indent + delta ,
249
+ offset : self . offset + delta ,
250
250
} )
251
251
}
252
252
253
- pub ( crate ) fn offset_left ( & self , width : usize ) -> Option < Shape > {
254
- self . add_offset ( width ) . sub_width ( width )
253
+ pub ( crate ) fn offset_left ( & self , delta : usize ) -> Option < Shape > {
254
+ self . add_offset ( delta ) . sub_width ( delta )
255
255
}
256
256
257
257
pub ( crate ) fn used_width ( & self ) -> usize {
0 commit comments