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

fmt: remove unnecessary parentheses after return (fix #11423) (#11435)

This commit is contained in:
yuyi
2021-09-08 19:19:53 +08:00
committed by GitHub
parent bef3390f36
commit e5360e164a
12 changed files with 36 additions and 16 deletions

View File

@ -39,7 +39,7 @@ pub fn (mut rng PCG32RNG) u32() u32 {
rng.state = oldstate * (6364136223846793005) + rng.inc
xorshifted := u32(((oldstate >> u64(18)) ^ oldstate) >> u64(27))
rot := u32(oldstate >> u64(59))
return ((xorshifted >> rot) | (xorshifted << ((-rot) & u32(31))))
return (xorshifted >> rot) | (xorshifted << ((-rot) & u32(31)))
}
// u64 returns a pseudorandom 64-bit unsigned `u64`.
@ -66,7 +66,7 @@ pub fn (mut rng PCG32RNG) u32n(max u32) u32 {
for {
r := rng.u32()
if r >= threshold {
return (r % max)
return r % max
}
}
return u32(0)
@ -83,7 +83,7 @@ pub fn (mut rng PCG32RNG) u64n(max u64) u64 {
for {
r := rng.u64()
if r >= threshold {
return (r % max)
return r % max
}
}
return u64(0)