Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

frontend: Redirect when space in crate name#11580

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Its-Just-Nans wants to merge1 commit intorust-lang:main
base:main
Choose a base branch
Loading
fromIts-Just-Nans:redirect-when-space

Conversation

Its-Just-Nans
Copy link

Hi

When there is leading or trailing space in the crate name, the crate is not found (obviously)

https://crates.io/crates/syn Working

https://crates.io/crates/%20syn Not found

I think this could be useful, mostly if we paste a crate name

@Turbo87
Copy link
Member

@rust-lang/crates-io any thoughts?

@Turbo87Turbo87 added C-enhancement ✨Category: Adding new behavior or a change to the way an existing feature works A-frontend 🐹 labelsJul 16, 2025
@Turbo87Turbo87 changed the titlefeature: redirect when space in crate namefrontend: Redirect when space in crate nameJul 16, 2025
@LawnGnome
Copy link
Contributor

I'm assuming the use case here is something like a keyword bookmarkhttps://crates.io/crates/%s.

I can see why it would be useful (since I use keywords all the time), but I'm not sure it makes sense to complicate the frontend route handling to support this, since the search does ignore leading or trailing whitespace correctly. I'm probably -0.5 on changing this, but I also don't feel very strongly.

@Its-Just-Nans
Copy link
Author

On my side it was more a UX improvement

If I go tohttps://crates.io/crates/syn

image

But If I make a small typo (and a bad copy-paste) and go here

https://crates.io/crates/%20syn

image

The message "syn: Crate not found" is not great

image

So either

  • change to have a redirection
  • add quote to the message
imageimage

Both fixes are easy and seems OK
But I prefer the redirection since there is a lot probability that the user modify his typo

@eth3lbert
Copy link
Contributor

I'm okay with it. It doesn't overcomplicate things and brings some improvement.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
A-frontend 🐹C-enhancement ✨Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@Its-Just-Nans@Turbo87@LawnGnome@eth3lbert

[8]ページ先頭

©2009-2025 Movatter.jp