all: change 'if !(a in b)' to 'if a !in b' (#11330)
parent
118c5fdcd8
commit
8be2be8311
|
@ -338,7 +338,7 @@ fn (mut ad AnchorData) check_link_target_match(fpath string, mut res CheckResult
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for link, anchor_lists in ad.anchors {
|
for link, anchor_lists in ad.anchors {
|
||||||
if !(link in checked_headlines) {
|
if link !in checked_headlines {
|
||||||
if anchor_lists.len > 1 {
|
if anchor_lists.len > 1 {
|
||||||
for anchor in anchor_lists {
|
for anchor in anchor_lists {
|
||||||
line := match anchor {
|
line := match anchor {
|
||||||
|
|
|
@ -96,7 +96,7 @@ fn (mut ctx CancelContext) cancel(remove_from_parent bool, err IError) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.mutex.@lock()
|
ctx.mutex.@lock()
|
||||||
if !(ctx.err is none) {
|
if ctx.err !is none {
|
||||||
ctx.mutex.unlock()
|
ctx.mutex.unlock()
|
||||||
// already canceled
|
// already canceled
|
||||||
return
|
return
|
||||||
|
|
|
@ -75,7 +75,7 @@ fn (mut dom DocumentObjectModel) add_tag_attribute(tag &Tag) {
|
||||||
|
|
||||||
fn (mut dom DocumentObjectModel) add_tag_by_type(tag &Tag) {
|
fn (mut dom DocumentObjectModel) add_tag_by_type(tag &Tag) {
|
||||||
tag_name := tag.name
|
tag_name := tag.name
|
||||||
if !(tag_name in dom.tag_type) {
|
if tag_name !in dom.tag_type {
|
||||||
dom.tag_type[tag_name] = [tag]
|
dom.tag_type[tag_name] = [tag]
|
||||||
} else {
|
} else {
|
||||||
mut temp_array := dom.tag_type[tag_name]
|
mut temp_array := dom.tag_type[tag_name]
|
||||||
|
|
|
@ -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'
|
// absolute paths instead of 'vlib' & '.vmodules'
|
||||||
mut vmod_folders := ['vlib', '.vmodules', 'modules']
|
mut vmod_folders := ['vlib', '.vmodules', 'modules']
|
||||||
for base in pref.lookup_path.map(os.base(it)) {
|
for base in pref.lookup_path.map(os.base(it)) {
|
||||||
if !(base in vmod_folders) {
|
if base !in vmod_folders {
|
||||||
vmod_folders << base
|
vmod_folders << base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {
|
fn (mut tf TTF_File) read_kern_table() {
|
||||||
dprintln('*** READ KERN TABLE ***')
|
dprintln('*** READ KERN TABLE ***')
|
||||||
if !('kern' in tf.tables) {
|
if 'kern' !in tf.tables {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
table_offset := tf.tables['kern'].offset
|
table_offset := tf.tables['kern'].offset
|
||||||
|
|
Loading…
Reference in New Issue