Summary
Input code:
pub fn layer<L>(self, layer: L) -> Self
where
L: Layer<
Route,
Service: Service<
Request,
Response: IntoResponse + 'static,
Error: Into<Infallible> + 'static,
Future: Send + 'static,
> + Clone + Send + Sync + 'static,
> + Clone + Send + Sync + 'static,
{
map_inner!(self, this => RouterInner {
path_router: this.path_router.layer(layer.clone()),
default_fallback: this.default_fallback,
catch_all_fallback: this.catch_all_fallback.map(|route| route.layer(layer)),
})
}
What rustfmt formats it as:
pub fn layer<L>(self, layer: L) -> Self
where
L: Layer<
Route,
Service: Service<
Request,
Response: IntoResponse + 'static,
Error: Into<Infallible> + 'static,
Future: Send + 'static,
> + Clone
+ Send
+ Sync
+ 'static,
> + Clone
+ Send
+ Sync
+ 'static,
{
map_inner!(self, this => RouterInner {
path_router: this.path_router.layer(layer.clone()),
default_fallback: this.default_fallback,
catch_all_fallback: this.catch_all_fallback.map(|route| route.layer(layer)),
})
}
Configuration
rustfmt --version:
rustfmt 1.9.0-nightly (9eb3be26b4 2026-05-18)
Summary
Input code:
What rustfmt formats it as:
Configuration
rustfmt --version: