@@ -25,9 +25,9 @@ pub trait Buffer {
25
25
/// let mut state = FormatState::new(SimpleFormatContext::default());
26
26
/// let mut buffer = VecBuffer::new(&mut state);
27
27
///
28
- /// buffer.write_element(FormatElement::StaticText { text: "test"});
28
+ /// buffer.write_element(FormatElement::Token { text: "test"});
29
29
///
30
- /// assert_eq!(buffer.into_vec(), vec![FormatElement::StaticText { text: "test" }]);
30
+ /// assert_eq!(buffer.into_vec(), vec![FormatElement::Token { text: "test" }]);
31
31
/// ```
32
32
fn write_element ( & mut self , element : FormatElement ) ;
33
33
@@ -50,9 +50,9 @@ pub trait Buffer {
50
50
/// let mut state = FormatState::new(SimpleFormatContext::default());
51
51
/// let mut buffer = VecBuffer::new(&mut state);
52
52
///
53
- /// buffer.write_fmt(format_args!(text ("Hello World"))).unwrap();
53
+ /// buffer.write_fmt(format_args!(token ("Hello World"))).unwrap();
54
54
///
55
- /// assert_eq!(buffer.into_vec(), vec![FormatElement::StaticText { text: "Hello World" }]);
55
+ /// assert_eq!(buffer.into_vec(), vec![FormatElement::Token { text: "Hello World" }]);
56
56
/// ```
57
57
fn write_fmt ( mut self : & mut Self , arguments : Arguments < Self :: Context > ) -> FormatResult < ( ) > {
58
58
write ( & mut self , arguments)
@@ -316,11 +316,11 @@ where
316
316
/// write!(
317
317
/// buffer,
318
318
/// [
319
- /// text ("The next soft line or space gets replaced by a space"),
319
+ /// token ("The next soft line or space gets replaced by a space"),
320
320
/// soft_line_break_or_space(),
321
- /// text ("and the line here"),
321
+ /// token ("and the line here"),
322
322
/// soft_line_break(),
323
- /// text ("is removed entirely.")
323
+ /// token ("is removed entirely.")
324
324
/// ]
325
325
/// )
326
326
/// })]
@@ -329,10 +329,10 @@ where
329
329
/// assert_eq!(
330
330
/// formatted.document().as_ref(),
331
331
/// &[
332
- /// FormatElement::StaticText { text: "The next soft line or space gets replaced by a space" },
332
+ /// FormatElement::Token { text: "The next soft line or space gets replaced by a space" },
333
333
/// FormatElement::Space,
334
- /// FormatElement::StaticText { text: "and the line here" },
335
- /// FormatElement::StaticText { text: "is removed entirely." }
334
+ /// FormatElement::Token { text: "and the line here" },
335
+ /// FormatElement::Token { text: "is removed entirely." }
336
336
/// ]
337
337
/// );
338
338
///
@@ -488,19 +488,19 @@ pub trait BufferExtensions: Buffer + Sized {
488
488
/// let formatted = format!(SimpleFormatContext::default(), [format_with(|f| {
489
489
/// let mut recording = f.start_recording();
490
490
///
491
- /// write!(recording, [text ("A")])?;
492
- /// write!(recording, [text ("B")])?;
491
+ /// write!(recording, [token ("A")])?;
492
+ /// write!(recording, [token ("B")])?;
493
493
///
494
- /// write!(recording, [format_with(|f| write!(f, [text ("C"), text ("D")]))])?;
494
+ /// write!(recording, [format_with(|f| write!(f, [token ("C"), token ("D")]))])?;
495
495
///
496
496
/// let recorded = recording.stop();
497
497
/// assert_eq!(
498
498
/// recorded.deref(),
499
499
/// &[
500
- /// FormatElement::StaticText { text: "A" },
501
- /// FormatElement::StaticText { text: "B" },
502
- /// FormatElement::StaticText { text: "C" },
503
- /// FormatElement::StaticText { text: "D" }
500
+ /// FormatElement::Token { text: "A" },
501
+ /// FormatElement::Token { text: "B" },
502
+ /// FormatElement::Token { text: "C" },
503
+ /// FormatElement::Token { text: "D" }
504
504
/// ]
505
505
/// );
506
506
///
0 commit comments