The controllers test compiles again: a closure can't name the lifetime its Ctx borrows #321

Merged
enricobuehler merged 1 commits from worktree-console-ui-ctx-lifetime into main 2026-08-19 06:18:43 +00:00
1 Commits
Author SHA1 Message Date
enricobuehler fcdb2a53de fix(console-ui): the controllers test builds its Ctx in a fn, not a closure
ci / bun-nix (pull_request) Successful in 31s
ci / web (pull_request) Successful in 1m7s
ci / docs-site (pull_request) Successful in 1m16s
windows-client / client (arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (pull_request) Successful in 3m36s
ci / rust-arm64 (pull_request) Successful in 4m13s
android / android (pull_request) Successful in 5m49s
windows-client / client (x64, , x86_64-pc-windows-msvc, C:\t) (pull_request) Successful in 6m52s
ci / rust (pull_request) Successful in 19m45s
A closure cannot be generic over the lifetime in its return type, so the
`Ctx<'_>` this one built could never be tied to the `&mut Settings` it
borrows — `lifetime may not live long enough`, and the lib test target
failed to compile.

Same shape the add_host and library test modules already use: a plain
`fn ctx<'a>(…) -> Ctx<'a>` where the lifetime is written down once.
2026-08-19 08:17:10 +02:00