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

fmt: remove redundant parenthesis in the complex infix expr (#17873)

This commit is contained in:
yuyi
2023-04-04 18:47:48 +08:00
committed by GitHub
parent 8452644ec3
commit 467a1b4435
44 changed files with 141 additions and 117 deletions

View File

@@ -74,7 +74,7 @@ fn bellman_ford[T](graph [][]T, src int) {
mut u := edges[j].src
mut v := edges[j].dest
mut weight := edges[j].weight
if (dist[u] != large) && (dist[u] + weight < dist[v]) {
if dist[u] != large && dist[u] + weight < dist[v] {
dist[v] = dist[u] + weight
}
}
@@ -88,7 +88,7 @@ fn bellman_ford[T](graph [][]T, src int) {
mut u := edges[j].src
mut v := edges[j].dest
mut weight := edges[j].weight
if (dist[u] != large) && (dist[u] + weight < dist[v]) {
if dist[u] != large && dist[u] + weight < dist[v] {
print('\n Graph contains negative weight cycle')
// If negative cycle is detected, simply
// return or an exit(1)