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 {
43
43
/// # Panic
44
44
///
45
45
/// 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 {
47
47
Referer ( HeaderValueString :: from_static ( s) )
48
48
}
49
49
}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ impl Server {
43
43
/// # Panic
44
44
///
45
45
/// 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 {
47
47
Server ( HeaderValueString :: from_static ( s) )
48
48
}
49
49
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ impl UserAgent {
52
52
/// # Panic
53
53
///
54
54
/// 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 {
56
56
UserAgent ( HeaderValueString :: from_static ( src) )
57
57
}
58
58
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ impl HeaderValueString {
35
35
. map ( |value| HeaderValueString { value } )
36
36
}
37
37
38
- pub ( crate ) fn from_static ( src : & ' static str ) -> HeaderValueString {
38
+ pub ( crate ) const fn from_static ( src : & ' static str ) -> HeaderValueString {
39
39
// A valid `str` (the argument)...
40
40
HeaderValueString {
41
41
value : HeaderValue :: from_static ( src) ,
You can’t perform that action at this time.
0 commit comments