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

Improve the margin calculation for the search command's UI #12890

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

Rustin170506
Copy link
Member

What does this PR try to resolve?

Improved the margin calculation for the search command's UI.

  1. We don't need always to do the addition, we can only add it after we find the max value.
  2. We can use Formatted print to add the margin spaces.

How should we test and review this PR?

I don't break any tests. So it would be OK.

Additional information

None

@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2023

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-interacts-with-crates.io Area: interaction with registries Command-search S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 28, 2023
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Some nitpicks. Thanks for the contribution!

src/cargo/ops/registry/search.rs Outdated Show resolved Hide resolved
src/cargo/ops/registry/search.rs Outdated Show resolved Hide resolved
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
@Rustin170506
Copy link
Member Author

Thanks for your review! 💚 💙 💜 💛 ❤️

@weihanglo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Oct 29, 2023

📌 Commit cb901f2 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 29, 2023
@bors
Copy link
Contributor

bors commented Oct 29, 2023

⌛ Testing commit cb901f2 with merge b1a3ad2...

@bors
Copy link
Contributor

bors commented Oct 29, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing b1a3ad2 to master...

@bors bors merged commit b1a3ad2 into rust-lang:master Oct 29, 2023
20 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2023
Update cargo

7 commits in 708383d620e183a9ece69b8fe930c411d83dee27..b4d18d4bd3db6d872892f6c87c51a02999b80802
2023-10-27 21:09:26 +0000 to 2023-10-31 18:19:10 +0000
- refactor(toml): Cleanup noticed on the way to rust-lang/cargo#12801 (rust-lang/cargo#12902)
- feat(trim-paths): set env `CARGO_TRIM_PATHS` for build scripts (rust-lang/cargo#12900)
- feat: implement RFC 3127 `-Ztrim-paths` (rust-lang/cargo#12625)
- docs: clarify config to use vendored source is printed to stdout (rust-lang/cargo#12893)
- Improve the margin calculation for the search command's UI (rust-lang/cargo#12890)
- Add new packages to [workspace.members] automatically (rust-lang/cargo#12779)
- refactor(toml): Decouple parsing from interning system (rust-lang/cargo#12881)

r? ghost
@ehuss ehuss added this to the 1.75.0 milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interacts-with-crates.io Area: interaction with registries Command-search S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants