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

route rank clarification #2687

Closed
2 tasks done
szabgab opened this issue Jan 2, 2024 · 1 comment
Closed
2 tasks done

route rank clarification #2687

szabgab opened this issue Jan 2, 2024 · 1 comment
Labels
docs Improvements or additions to documentation

Comments

@szabgab
Copy link
Sponsor

szabgab commented Jan 2, 2024

What kind of documentation problem are you reporting?

Unclear Docs

Where is the issue found?

https://rocket.rs/v0.5/guide/requests/#forwarding

What's wrong?

https://rocket.rs/v0.5/guide/requests/ in the Forwarding section has this text: "Rocket chooses a default ranking from -12 to -1," while the example following it uses positive numbers for ranks. It is rather confusing. Should the ranks be number between 1-12? Maybe what it mean is that by default it is set between -12 and -1 but the developer can set it to any positive whole number?

ps. I could not find this text in the repo, but I had to check the checkbox of "exists on the master on GitHub"

System Checks

  • I confirmed that the issue still exists on master on GitHub.
  • I was unable to find a previous report of this problem.
@szabgab szabgab added the docs Improvements or additions to documentation label Jan 2, 2024
@szabgab szabgab changed the title rout rank clarification route rank clarification Jan 2, 2024
@SergioBenitez
Copy link
Member

Should the ranks be number between 1-12?

No, it's correct as written, and hopefully the following section makes it clear that -12 to -1 is indeed correct.

Maybe what it mean is that by default it is set between -12 and -1 but the developer can set it to any positive whole number?

This is mostly correct. You can technically set a negative rank when creating a route manually, but you can only set a positive rank when doing so via the attribute. This is by intention. The goal is to avoid confusing the developer by having Rocket assign ranks that the user can also assign.

In any case, I agree that the wording could be improved. Change incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants