-
Notifications
You must be signed in to change notification settings - Fork 10
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
lib: rewrite i-face introspection without promises #245
Conversation
lib/transport-common.js
Outdated
let errored = false; | ||
const len = interfaces.length; | ||
let cnt = 0; | ||
interfaces.map(name => connection.inspectInterface(name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of using a map
method here, if the result is being ignored in the end?
Maybe replace it with forEach
?
lib/transport-common.js
Outdated
reject(error); | ||
} else { | ||
resolve(proxy); | ||
const proxies = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This object should be created with Object.create(null)
like it was done before this patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@belochub yes, it's better, thanks
67639cb
to
3d9e87c
Compare
Name and commit message of this PR exceed the 50 character limit, it should be renamed. |
lib/transport-common.js
Outdated
const proxies = Object.create(null); | ||
let errored = false; | ||
const len = interfaces.length; | ||
let cnt = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it is better to rename this variable to full name (count
) to avoid possible misunderstanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending @belochub's comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after adressing @belochub comments.
3d9e87c
to
076bea3
Compare
@belochub agree, fixed, who will merge? |
076bea3
to
757e00e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR-URL: #245 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Landed in 43c61e7. |
PR-URL: #245 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
PR-URL: #245 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
No description provided.