@@ -24,16 +24,16 @@ impl Renderer {
24
24
}
25
25
26
26
/// No terminal styling
27
- pub fn plain ( ) -> Self {
27
+ pub const fn plain ( ) -> Self {
28
28
Self {
29
29
anonymized_line_numbers : false ,
30
30
margin : None ,
31
- stylesheet : StyleSheet :: default ( ) ,
31
+ stylesheet : StyleSheet :: const_default ( ) ,
32
32
}
33
33
}
34
34
35
35
/// Default terminal styling
36
- pub fn styled ( ) -> Self {
36
+ pub const fn styled ( ) -> Self {
37
37
Self {
38
38
anonymized_line_numbers : false ,
39
39
margin : None ,
@@ -50,52 +50,52 @@ impl Renderer {
50
50
}
51
51
}
52
52
53
- pub fn anonymized_line_numbers ( mut self , anonymized_line_numbers : bool ) -> Self {
53
+ pub const fn anonymized_line_numbers ( mut self , anonymized_line_numbers : bool ) -> Self {
54
54
self . anonymized_line_numbers = anonymized_line_numbers;
55
55
self
56
56
}
57
57
58
- pub fn margin ( mut self , margin : Option < Margin > ) -> Self {
58
+ pub const fn margin ( mut self , margin : Option < Margin > ) -> Self {
59
59
self . margin = margin;
60
60
self
61
61
}
62
62
63
- pub fn error ( mut self , style : Style ) -> Self {
63
+ pub const fn error ( mut self , style : Style ) -> Self {
64
64
self . stylesheet . error = style;
65
65
self
66
66
}
67
67
68
- pub fn warning ( mut self , style : Style ) -> Self {
68
+ pub const fn warning ( mut self , style : Style ) -> Self {
69
69
self . stylesheet . warning = style;
70
70
self
71
71
}
72
72
73
- pub fn info ( mut self , style : Style ) -> Self {
73
+ pub const fn info ( mut self , style : Style ) -> Self {
74
74
self . stylesheet . info = style;
75
75
self
76
76
}
77
77
78
- pub fn note ( mut self , style : Style ) -> Self {
78
+ pub const fn note ( mut self , style : Style ) -> Self {
79
79
self . stylesheet . note = style;
80
80
self
81
81
}
82
82
83
- pub fn help ( mut self , style : Style ) -> Self {
83
+ pub const fn help ( mut self , style : Style ) -> Self {
84
84
self . stylesheet . help = style;
85
85
self
86
86
}
87
87
88
- pub fn line_no ( mut self , style : Style ) -> Self {
88
+ pub const fn line_no ( mut self , style : Style ) -> Self {
89
89
self . stylesheet . line_no = style;
90
90
self
91
91
}
92
92
93
- pub fn emphasis ( mut self , style : Style ) -> Self {
93
+ pub const fn emphasis ( mut self , style : Style ) -> Self {
94
94
self . stylesheet . emphasis = style;
95
95
self
96
96
}
97
97
98
- pub fn none ( mut self , style : Style ) -> Self {
98
+ pub const fn none ( mut self , style : Style ) -> Self {
99
99
self . stylesheet . none = style;
100
100
self
101
101
}
0 commit comments