File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ impl Referer {
4343 /// # Panic
4444 ///
4545 /// Panics if the string is not a legal header value.
46- pub fn from_static ( s : & ' static str ) -> Referer {
46+ pub const fn from_static ( s : & ' static str ) -> Referer {
4747 Referer ( HeaderValueString :: from_static ( s) )
4848 }
4949}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ impl Server {
4343 /// # Panic
4444 ///
4545 /// Panics if the static string is not a legal header value.
46- pub fn from_static ( s : & ' static str ) -> Server {
46+ pub const fn from_static ( s : & ' static str ) -> Server {
4747 Server ( HeaderValueString :: from_static ( s) )
4848 }
4949
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ impl UserAgent {
5252 /// # Panic
5353 ///
5454 /// Panics if the static string is not a legal header value.
55- pub fn from_static ( src : & ' static str ) -> UserAgent {
55+ pub const fn from_static ( src : & ' static str ) -> UserAgent {
5656 UserAgent ( HeaderValueString :: from_static ( src) )
5757 }
5858
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ impl HeaderValueString {
3535 . map ( |value| HeaderValueString { value } )
3636 }
3737
38- pub ( crate ) fn from_static ( src : & ' static str ) -> HeaderValueString {
38+ pub ( crate ) const fn from_static ( src : & ' static str ) -> HeaderValueString {
3939 // A valid `str` (the argument)...
4040 HeaderValueString {
4141 value : HeaderValue :: from_static ( src) ,
You can’t perform that action at this time.
0 commit comments