mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: remove redundant array.contains definitions (#7464)
This commit is contained in:
@@ -93,15 +93,6 @@ pub fn (t Type) share() ShareType {
|
||||
return sharetype_from_flags(t.has_flag(.shared_f), t.has_flag(.atomic_f))
|
||||
}
|
||||
|
||||
pub fn (types []Type) contains(typ Type) bool {
|
||||
for t in types {
|
||||
if int(typ) == int(t) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// return TypeSymbol idx for `t`
|
||||
[inline]
|
||||
pub fn (t Type) idx() int {
|
||||
|
||||
@@ -311,15 +311,6 @@ pub fn (t Kind) is_assign() bool {
|
||||
return t in assign_tokens
|
||||
}
|
||||
|
||||
fn (t []Kind) contains(val Kind) bool {
|
||||
for tt in t {
|
||||
if tt == val {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
pub fn (t Kind) str() string {
|
||||
return token_str[int(t)]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user