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

net.html: use or {} in .writeln() method calls (fix #8942) (#8953)

This commit is contained in:
StunxFS
2021-02-25 08:24:30 -04:00
committed by GitHub
parent 1a8e502e2c
commit 2e381f427a
5 changed files with 31 additions and 44 deletions

View File

@ -12,7 +12,7 @@ mut:
[inline]
fn is_null(data int) bool {
return data == null_element
return data == html.null_element
}
[inline]
@ -21,15 +21,11 @@ fn (stack Stack) is_empty() bool {
}
fn (stack Stack) peek() int {
return if !stack.is_empty() {
stack.elements[stack.size - 1]
} else {
null_element
}
return if !stack.is_empty() { stack.elements[stack.size - 1] } else { html.null_element }
}
fn (mut stack Stack) pop() int {
mut to_return := null_element
mut to_return := html.null_element
if !stack.is_empty() {
to_return = stack.elements[stack.size - 1]
stack.size--