Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcdserver: remove redundant parentheses. #10375

Merged
merged 1 commit into from
Jan 8, 2019
Merged

etcdserver: remove redundant parentheses. #10375

merged 1 commit into from
Jan 8, 2019

Conversation

johncming
Copy link
Contributor

Extra parentheses are not necessary.

@codecov-io
Copy link

codecov-io commented Jan 7, 2019

Codecov Report

Merging #10375 into master will increase coverage by 0.11%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10375      +/-   ##
==========================================
+ Coverage   71.71%   71.83%   +0.11%     
==========================================
  Files         392      392              
  Lines       36421    36421              
==========================================
+ Hits        26121    26164      +43     
+ Misses       8488     8443      -45     
- Partials     1812     1814       +2
Impacted Files Coverage Δ
etcdserver/api/v2v3/store.go 0% <0%> (ø) ⬆️
etcdserver/api/v2store/node.go 96.53% <100%> (ø) ⬆️
etcdserver/api/v2store/watcher_hub.go 96.29% <100%> (ø) ⬆️
etcdserver/api/v2store/event_history.go 100% <100%> (ø) ⬆️
pkg/transport/listener.go 58.67% <0%> (-4.09%) ⬇️
proxy/grpcproxy/watch.go 88.55% <0%> (-1.21%) ⬇️
etcdserver/cluster_util.go 58.74% <0%> (-0.9%) ⬇️
clientv3/lease.go 91.85% <0%> (-0.75%) ⬇️
clientv3/leasing/kv.go 89.03% <0%> (-0.67%) ⬇️
etcdserver/server.go 74.53% <0%> (+0.14%) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0aeb70...802e2aa. Read the comment docs.

@xiang90
Copy link
Contributor

xiang90 commented Jan 7, 2019

does any tool complaint about this? i feel the parentheses make the code more readable actually.

@johncming
Copy link
Contributor Author

does any tool complaint about this? i feel the parentheses make the code more readable actually.

yes, jetbrains goland complaints about this, but it's a weak warning. These changes are optional.

Some code doesn't have these parentheses,it also looks good to read without parentheses

newLeader := rd.SoftState.Lead != raft.None && rh.getLead() != rd.SoftState.Lead

@xiang90
Copy link
Contributor

xiang90 commented Jan 8, 2019

ok. fine with me if the ide complaints.

@xiang90 xiang90 merged commit b04633f into etcd-io:master Jan 8, 2019
@johncming johncming deleted the redundant-parentheses branch January 9, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants