mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: make the default values for all enums, be their first listed entry, even if it was enum MyEnum { first = 999 second}
, not just the defaul 0
(#18388)
This commit is contained in:
@ -32,6 +32,7 @@ pub mut:
|
||||
//
|
||||
// See https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 for details.
|
||||
pub enum SameSite {
|
||||
same_site_not_set
|
||||
same_site_default_mode = 1
|
||||
same_site_lax_mode
|
||||
same_site_strict_mode
|
||||
@ -162,6 +163,7 @@ pub fn (c &Cookie) str() string {
|
||||
b.write_string('; Secure')
|
||||
}
|
||||
match c.same_site {
|
||||
.same_site_not_set {}
|
||||
.same_site_default_mode {
|
||||
b.write_string('; SameSite')
|
||||
}
|
||||
|
Reference in New Issue
Block a user