1
0
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:
yuyi
2020-12-22 15:32:32 +08:00
committed by GitHub
parent 939e10cb28
commit b47daad40d
5 changed files with 41 additions and 164 deletions

View File

@@ -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 {

View File

@@ -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)]
}