@@ -5,7 +5,7 @@ use crate::object::TextStrLike;
55/// A builder for a content stream.
66pub struct Content {
77 buf : Buf ,
8- settings : WriteSettings ,
8+ write_settings : WriteSettings ,
99 q_depth : usize ,
1010}
1111
@@ -19,9 +19,9 @@ impl Content {
1919 }
2020
2121 /// TODO
22- pub fn new_with ( settings : WriteSettings ) -> Self {
22+ pub fn new_with ( write_settings : WriteSettings ) -> Self {
2323 let mut content = Self :: new ( ) ;
24- content. settings = settings ;
24+ content. write_settings = write_settings ;
2525
2626 content
2727 }
@@ -31,14 +31,14 @@ impl Content {
3131 Self {
3232 buf : Buf :: with_capacity ( capacity) ,
3333 q_depth : 0 ,
34- settings : Default :: default ( ) ,
34+ write_settings : Default :: default ( ) ,
3535 }
3636 }
3737
3838 /// Start writing an arbitrary operation.
3939 #[ inline]
4040 pub fn op < ' a > ( & ' a mut self , operator : & ' a str ) -> Operation < ' a > {
41- Operation :: start ( & mut self . buf , operator, self . settings )
41+ Operation :: start ( & mut self . buf , operator, self . write_settings )
4242 }
4343
4444 /// Return the buffer of the content stream.
@@ -65,13 +65,17 @@ pub struct Operation<'a> {
6565 buf : & ' a mut Buf ,
6666 op : & ' a str ,
6767 first : bool ,
68- settings : WriteSettings ,
68+ write_settings : WriteSettings ,
6969}
7070
7171impl < ' a > Operation < ' a > {
7272 #[ inline]
73- pub ( crate ) fn start ( buf : & ' a mut Buf , op : & ' a str , settings : WriteSettings ) -> Self {
74- Self { buf, op, first : true , settings }
73+ pub ( crate ) fn start (
74+ buf : & ' a mut Buf ,
75+ op : & ' a str ,
76+ write_settings : WriteSettings ,
77+ ) -> Self {
78+ Self { buf, op, first : true , write_settings }
7579 }
7680
7781 /// Write a primitive operand.
@@ -102,7 +106,7 @@ impl<'a> Operation<'a> {
102106 }
103107 self . first = false ;
104108 // TODO: Refine padding?
105- Obj :: direct ( self . buf , 0 , self . settings , false )
109+ Obj :: direct ( self . buf , 0 , self . write_settings , false )
106110 }
107111}
108112
0 commit comments