File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ pub struct Config {
161161
162162impl Config {
163163 /// Create a new `Config`.
164- pub fn new ( char_set : CharacterSet , pad : bool ) -> Config {
164+ pub const fn new ( char_set : CharacterSet , pad : bool ) -> Config {
165165 Config {
166166 char_set,
167167 pad,
@@ -170,15 +170,15 @@ impl Config {
170170 }
171171
172172 /// Sets whether to pad output with `=` characters.
173- pub fn pad ( self , pad : bool ) -> Config {
173+ pub const fn pad ( self , pad : bool ) -> Config {
174174 Config { pad, ..self }
175175 }
176176
177177 /// Sets whether to emit errors for nonzero trailing bits.
178178 ///
179179 /// This is useful when implementing
180180 /// [forgiving-base64 decode](https://infra.spec.whatwg.org/#forgiving-base64-decode).
181- pub fn decode_allow_trailing_bits ( self , allow : bool ) -> Config {
181+ pub const fn decode_allow_trailing_bits ( self , allow : bool ) -> Config {
182182 Config {
183183 decode_allow_trailing_bits : allow,
184184 ..self
@@ -236,7 +236,7 @@ pub const IMAP_MUTF7: Config = Config {
236236} ;
237237
238238/// BinHex character set
239- pub const BINHEX : Config = Config {
239+ pub const BINHEX : Config = Config {
240240 char_set : CharacterSet :: BinHex ,
241241 pad : false ,
242242 decode_allow_trailing_bits : false ,
You can’t perform that action at this time.
0 commit comments