mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: remove unnecessary IError() casts
This commit is contained in:
@ -49,8 +49,8 @@ pub fn (mut app App) get_csrf_token() ?string {
|
||||
if app.csrf_cookie_value != '' {
|
||||
return app.csrf_cookie_value
|
||||
} else {
|
||||
return IError(CsrfError{
|
||||
return CsrfError{
|
||||
m: 'The CSRF-Token-Value is empty. Please check if you have setted a cookie!'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
|
||||
}
|
||||
if attr.starts_with('/') {
|
||||
if path != '' {
|
||||
return IError(http.MultiplePathAttributesError{})
|
||||
return http.MultiplePathAttributesError{}
|
||||
}
|
||||
path = attr
|
||||
x.delete(i)
|
||||
@ -33,9 +33,9 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
|
||||
i++
|
||||
}
|
||||
if x.len > 0 {
|
||||
return IError(http.UnexpectedExtraAttributeError{
|
||||
return http.UnexpectedExtraAttributeError{
|
||||
attributes: x
|
||||
})
|
||||
}
|
||||
}
|
||||
if methods.len == 0 {
|
||||
methods = [http.Method.get]
|
||||
|
Reference in New Issue
Block a user