Skip to content

Simplify js tester a bit #90530

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 5, 2021
Merged

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-js Area: Rustdoc's JS front-end labels Nov 3, 2021
|| args[i] === "--test-folder"
|| args[i] === "--test-file"
|| args[i] === "--crate-name") {
if (correspondances[args[i]] !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (correspondances[args[i]] !== undefined) {
if (Object.hasOwn(correspondances, args[i])) {

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, a nit: "correspondances" should be spelled "correspondences". While you're at it, do you want to fix the spelling?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

@camelid camelid added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Nov 3, 2021
@GuillaumeGomez
Copy link
Member Author

Updated. TIL thanks to both of you. :)

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

@notriddle I didn't check the requirements but they're quite high in fact! I'll revert to hasOwnProperty.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

So apparently, Object.hasOwnProperty isn't a thing, but obj.hasOwnProperty is. Oh well, JS.

@GuillaumeGomez
Copy link
Member Author

@bors: r=notriddle rollup

@bors
Copy link
Collaborator

bors commented Nov 4, 2021

📌 Commit 3f496b5 has been approved by notriddle

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 4, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 4, 2021
…r=notriddle

Simplify js tester a bit

r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 4, 2021
…r=notriddle

Simplify js tester a bit

r? ``@notriddle``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 4, 2021
…r=notriddle

Simplify js tester a bit

r? ```@notriddle```
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 4, 2021
…r=notriddle

Simplify js tester a bit

r? ````@notriddle````
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 5, 2021
Rollup of 9 pull requests

Successful merges:

 - rust-lang#90507 (Suggest `extern crate alloc` when using undeclared module `alloc`)
 - rust-lang#90530 (Simplify js tester a bit)
 - rust-lang#90533 (Add note about x86 instruction prefixes in asm! to unstable book)
 - rust-lang#90537 (Update aarch64 `target_feature` list for LLVM 12.)
 - rust-lang#90544 (Demote metadata load warning to "info".)
 - rust-lang#90554 (Clean up some `-Z unstable-options` in tests.)
 - rust-lang#90556 (Add more text and examples to `carrying_{add|mul}`)
 - rust-lang#90563 (rustbot allow labels)
 - rust-lang#90571 (Fix missing bottom border for headings in sidebar)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 282d696 into rust-lang:master Nov 5, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 5, 2021
@GuillaumeGomez GuillaumeGomez deleted the simplify-js-tester branch November 5, 2021 09:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-rustdoc-js Area: Rustdoc's JS front-end C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants