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:
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 {
|
||||
if !(link in checked_headlines) {
|
||||
if link !in checked_headlines {
|
||||
if anchor_lists.len > 1 {
|
||||
for anchor in anchor_lists {
|
||||
line := match anchor {
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user