1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: change 'if !(a in b)' to 'if a !in b' (#11330)

This commit is contained in:
yuyi 2021-08-29 16:55:18 +08:00 committed by GitHub
parent 118c5fdcd8
commit 8be2be8311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -338,7 +338,7 @@ fn (mut ad AnchorData) check_link_target_match(fpath string, mut res CheckResult
}
}
for link, anchor_lists in ad.anchors {
if !(link in checked_headlines) {
if link !in checked_headlines {
if anchor_lists.len > 1 {
for anchor in anchor_lists {
line := match anchor {

View File

@ -96,7 +96,7 @@ fn (mut ctx CancelContext) cancel(remove_from_parent bool, err IError) {
}
ctx.mutex.@lock()
if !(ctx.err is none) {
if ctx.err !is none {
ctx.mutex.unlock()
// already canceled
return

View File

@ -75,7 +75,7 @@ fn (mut dom DocumentObjectModel) add_tag_attribute(tag &Tag) {
fn (mut dom DocumentObjectModel) add_tag_by_type(tag &Tag) {
tag_name := tag.name
if !(tag_name in dom.tag_type) {
if tag_name !in dom.tag_type {
dom.tag_type[tag_name] = [tag]
} else {
mut temp_array := dom.tag_type[tag_name]

View File

@ -55,7 +55,7 @@ pub fn mod_path_to_full_name(pref &pref.Preferences, mod string, path string) ?s
// absolute paths instead of 'vlib' & '.vmodules'
mut vmod_folders := ['vlib', '.vmodules', 'modules']
for base in pref.lookup_path.map(os.base(it)) {
if !(base in vmod_folders) {
if base !in vmod_folders {
vmod_folders << base
}
}

View File

@ -975,7 +975,7 @@ fn (mut tf TTF_File) create_kern_table0(vertical bool, cross bool) Kern0Table {
fn (mut tf TTF_File) read_kern_table() {
dprintln('*** READ KERN TABLE ***')
if !('kern' in tf.tables) {
if 'kern' !in tf.tables {
return
}
table_offset := tf.tables['kern'].offset