@@ -320,7 +320,7 @@ impl FormattingOptions {
320
320
/// always be printed.
321
321
/// - `-`: Currently not used
322
322
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
323
- pub const fn sign ( & mut self , sign : Option < Sign > ) -> & mut Self {
323
+ pub fn sign ( & mut self , sign : Option < Sign > ) -> & mut Self {
324
324
self . flags =
325
325
self . flags & !( 1 << rt:: Flag :: SignMinus as u32 | 1 << rt:: Flag :: SignPlus as u32 ) ;
326
326
match sign {
@@ -334,7 +334,7 @@ impl FormattingOptions {
334
334
///
335
335
/// This is used to indicate for integer formats that the padding to width should both be done with a 0 character as well as be sign-aware
336
336
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
337
- pub const fn sign_aware_zero_pad ( & mut self , sign_aware_zero_pad : bool ) -> & mut Self {
337
+ pub fn sign_aware_zero_pad ( & mut self , sign_aware_zero_pad : bool ) -> & mut Self {
338
338
if sign_aware_zero_pad {
339
339
self . flags |= 1 << rt:: Flag :: SignAwareZeroPad as u32
340
340
} else {
@@ -351,7 +351,7 @@ impl FormattingOptions {
351
351
/// - [`Octal`] - precedes the argument with a `0b`
352
352
/// - [`Binary`] - precedes the argument with a `0o`
353
353
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
354
- pub const fn alternate ( & mut self , alternate : bool ) -> & mut Self {
354
+ pub fn alternate ( & mut self , alternate : bool ) -> & mut Self {
355
355
if alternate {
356
356
self . flags |= 1 << rt:: Flag :: Alternate as u32
357
357
} else {
@@ -366,7 +366,7 @@ impl FormattingOptions {
366
366
/// being formatted is smaller than width some extra characters will be
367
367
/// printed around it.
368
368
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
369
- pub const fn fill ( & mut self , fill : char ) -> & mut Self {
369
+ pub fn fill ( & mut self , fill : char ) -> & mut Self {
370
370
self . fill = fill;
371
371
self
372
372
}
@@ -375,7 +375,7 @@ impl FormattingOptions {
375
375
/// The alignment specifies how the value being formatted should be
376
376
/// positioned if it is smaller than the width of the formatter.
377
377
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
378
- pub const fn align ( & mut self , align : Option < Alignment > ) -> & mut Self {
378
+ pub fn align ( & mut self , align : Option < Alignment > ) -> & mut Self {
379
379
self . align = align;
380
380
self
381
381
}
@@ -386,7 +386,7 @@ impl FormattingOptions {
386
386
/// the padding specified by [`FormattingOptions::fill`]/[`FormattingOptions::align`]
387
387
/// will be used to take up the required space.
388
388
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
389
- pub const fn width ( & mut self , width : Option < usize > ) -> & mut Self {
389
+ pub fn width ( & mut self , width : Option < usize > ) -> & mut Self {
390
390
self . width = width;
391
391
self
392
392
}
@@ -400,14 +400,14 @@ impl FormattingOptions {
400
400
/// - For floating-point types, this indicates how many digits after the
401
401
/// decimal point should be printed.
402
402
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
403
- pub const fn precision ( & mut self , precision : Option < usize > ) -> & mut Self {
403
+ pub fn precision ( & mut self , precision : Option < usize > ) -> & mut Self {
404
404
self . precision = precision;
405
405
self
406
406
}
407
407
/// Specifies whether the [`Debug`] trait should use lower-/upper-case
408
408
/// hexadecimal or normal integers
409
409
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
410
- pub const fn debug_as_hex ( & mut self , debug_as_hex : Option < DebugAsHex > ) -> & mut Self {
410
+ pub fn debug_as_hex ( & mut self , debug_as_hex : Option < DebugAsHex > ) -> & mut Self {
411
411
self . flags = self . flags
412
412
& !( 1 << rt:: Flag :: DebugUpperHex as u32 | 1 << rt:: Flag :: DebugLowerHex as u32 ) ;
413
413
match debug_as_hex {
@@ -479,7 +479,7 @@ impl FormattingOptions {
479
479
///
480
480
/// You may alternatively use [`Formatter::new()`].
481
481
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
482
- pub const fn create_formatter < ' a > ( self , write : & ' a mut ( dyn Write + ' a ) ) -> Formatter < ' a > {
482
+ pub fn create_formatter < ' a > ( self , write : & ' a mut ( dyn Write + ' a ) ) -> Formatter < ' a > {
483
483
Formatter { options : self , buf : write }
484
484
}
485
485
@@ -532,13 +532,13 @@ impl<'a> Formatter<'a> {
532
532
///
533
533
/// You may alternatively use [`FormattingOptions::create_formatter()`].
534
534
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
535
- pub const fn new ( write : & ' a mut ( dyn Write + ' a ) , options : FormattingOptions ) -> Self {
535
+ pub fn new ( write : & ' a mut ( dyn Write + ' a ) , options : FormattingOptions ) -> Self {
536
536
Formatter { options, buf : write }
537
537
}
538
538
539
539
/// Creates a new formatter based on this one with given [`FormattingOptions`].
540
540
#[ unstable( feature = "formatting_options" , issue = "118117" ) ]
541
- pub const fn with_options < ' b > ( & ' b mut self , options : FormattingOptions ) -> Formatter < ' b > {
541
+ pub fn with_options < ' b > ( & ' b mut self , options : FormattingOptions ) -> Formatter < ' b > {
542
542
Formatter { options, buf : self . buf }
543
543
}
544
544
}
0 commit comments