@@ -10,6 +10,7 @@ use crate::{
1010///
1111/// [`TextBoxStyle`]: struct.TextBoxStyle.html
1212#[ derive( Copy , Clone , Eq , PartialEq , Hash , Debug ) ]
13+ #[ must_use]
1314pub struct TextBoxStyleBuilder {
1415 style : TextBoxStyle ,
1516}
@@ -24,7 +25,6 @@ impl Default for TextBoxStyleBuilder {
2425impl TextBoxStyleBuilder {
2526 /// Creates a new text box style builder object.
2627 #[ inline]
27- #[ must_use]
2828 pub const fn new ( ) -> Self {
2929 Self {
3030 style : TextBoxStyle {
@@ -54,7 +54,6 @@ impl TextBoxStyleBuilder {
5454 /// .build();
5555 /// ```
5656 #[ inline]
57- #[ must_use]
5857 pub const fn line_height ( mut self , line_height : LineHeight ) -> Self {
5958 self . style . line_height = line_height;
6059
@@ -74,7 +73,6 @@ impl TextBoxStyleBuilder {
7473 /// .build();
7574 /// ```
7675 #[ inline]
77- #[ must_use]
7876 pub const fn paragraph_spacing ( mut self , paragraph_spacing : u32 ) -> Self {
7977 self . style . paragraph_spacing = paragraph_spacing;
8078
@@ -83,7 +81,6 @@ impl TextBoxStyleBuilder {
8381
8482 /// Sets the horizontal text alignment.
8583 #[ inline]
86- #[ must_use]
8784 pub const fn alignment ( mut self , alignment : HorizontalAlignment ) -> TextBoxStyleBuilder {
8885 self . style . alignment = alignment;
8986
@@ -92,7 +89,6 @@ impl TextBoxStyleBuilder {
9289
9390 /// Sets the vertical text alignment.
9491 #[ inline]
95- #[ must_use]
9692 pub const fn vertical_alignment (
9793 mut self ,
9894 vertical_alignment : VerticalAlignment ,
@@ -104,7 +100,6 @@ impl TextBoxStyleBuilder {
104100
105101 /// Sets the height mode.
106102 #[ inline]
107- #[ must_use]
108103 pub const fn height_mode ( mut self , height_mode : HeightMode ) -> TextBoxStyleBuilder {
109104 self . style . height_mode = height_mode;
110105
@@ -113,7 +108,6 @@ impl TextBoxStyleBuilder {
113108
114109 /// Sets the tab size.
115110 #[ inline]
116- #[ must_use]
117111 pub const fn tab_size ( mut self , tab_size : TabSize ) -> Self {
118112 self . style . tab_size = tab_size;
119113
@@ -124,7 +118,6 @@ impl TextBoxStyleBuilder {
124118 ///
125119 /// [`TextBoxStyle`]: struct.TextBoxStyle.html
126120 #[ inline]
127- #[ must_use]
128121 pub const fn build ( self ) -> TextBoxStyle {
129122 self . style
130123 }
0 commit comments