Skip to content

chore(deps): update topcoat requirement from =0.8.0 to =0.8.1 - #20

Open
dependabot[bot] wants to merge 1 commit into
devfrom
dependabot/cargo/topcoat-eq-0.8.1
Open

dependabot[bot] wants to merge 1 commit into
devfrom
dependabot/cargo/topcoat-eq-0.8.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 21, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on topcoat to permit the latest version.

Release notes

Sourced from topcoat's releases.

v0.8.1

Topcoat 0.8.1 makes a bunch of routing-related improvements, including support for trailing slahes and relative route paths on the module router.

Relative paths in the module router

The module router derives a handler's path from its enclosing module: src/app/settings.rs serves /settings. Until now, a handler either used that module path or opted out of it with an absolute path string, which also opted it out of the module router. Serving /settings/export from settings.rs meant creating a settings/export.rs module for it.

A path string starting with ./ is now joined onto the module path. The handler stays in the module router, so module_router!() still discovers it, segment! and path_param! declarations in the module tree still apply to it, and layouts and layers still wrap it by prefix.

// src/app/settings.rs: GET /settings
#[page]
async fn settings() -> Result<impl View> {
    Ok(view! { <h1>"Settings"</h1> })
}
// src/app/settings.rs: POST /settings/export
#[page(POST "./export")]
async fn export() -> Result<impl View> {
Ok(view! { <p>"Export started"</p> })
}

The same form works for #[route], #[layout], and #[layer]. A layout declared with #[layout("./admin")] in settings.rs wraps the pages under /settings/admin, and a layer declared with #[layer("./v1")] in api.rs wraps every request under /api/v1. See the module router guide.

Absolute path strings behave as before: they disable module path derivation for that handler, and the handler is registered by name rather than discovered.

Trailing slashes

A path may now end in a /, and the slash is part of the path. A page at /users/ is served at /users/, and a page at /users is served at /users. In 0.8, a path ending in a slash was an empty segment and rejected outright.

By default, a request for the form a route did not declare is redirected to the declared one with a 308. The status code preserves the method and the body, so a form posted to /signup/ is resubmitted to a page at /signup. The query string is kept. RouterBuilder::trailing_slash selects one of three policies:

  • TrailingSlash::Redirect redirects to the declared form. This is the default.
  • TrailingSlash::Serve serves the route under both forms. The client keeps the URL it asked for, and the handler can read it through uri.
  • TrailingSlash::Strict serves the declared form only, and the other form responds 404.
use topcoat::router::{Router, TrailingSlash};
let router = Router::builder()
.trailing_slash(TrailingSlash::Serve)
.build();

The policy never touches the root /, a route ending in a catch-all parameter, or a pair of routes registered at both forms of one path. A route that claims a form for itself is left alone.

In the module router, a bare ./ serves the module path itself with a trailing slash, and a relative path ending in a slash keeps it:

</tr></table> 

... (truncated)

Commits
  • e9a6ee8 chore: release v0.8.1 (#395)
  • 7db3c17 fix(cookie): cookies not being applied when responding with an error (#408)
  • 4f82910 feat(router): trailing slash support and automatic redirects (#407)
  • e0bc3b4 feat(router): relative module router routes (#406)
  • 65b1de1 feat(router): allow using SeeOther as error (#398)
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [topcoat](https://github.com/tokio-rs/topcoat) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/topcoat/releases)
- [Changelog](https://github.com/tokio-rs/topcoat/blob/main/release-plz.toml)
- [Commits](tokio-rs/topcoat@v0.8.0...v0.8.1)

---
updated-dependencies:
- dependency-name: topcoat
  dependency-version: 0.8.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies, rust. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants