treewide: cleanup

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia01590cdeed872cc8ebd16f6ca95f3cc6a6a6964
This commit is contained in:
raf 2026-03-11 17:23:51 +03:00
commit 185e3b562a
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
16 changed files with 258 additions and 219 deletions

View file

@ -331,7 +331,9 @@ impl SchemaValidator {
pub(crate) fn is_reserved_route(route: &str) -> bool {
RESERVED_ROUTES.iter().any(|reserved| {
route == *reserved || route.starts_with(&format!("{reserved}/"))
route == *reserved
|| (route.starts_with(reserved)
&& route.as_bytes().get(reserved.len()) == Some(&b'/'))
})
}
}