MCPcopy Create free account
hub / github.com/PerroEngine/Perro / title_from_slug

Function title_from_slug

perro_website/build.rs:519–524  ·  view source on GitHub ↗
(slug: &str)

Source from the content-addressed store, hash-verified

517}
518
519fn route_path(collection: &str, slug: &str) -> String {
520 match (collection, slug) {
521 ("book", "index") => "/book".to_string(),
522 ("book", slug) if slug.ends_with("/index") => {
523 format!("/book/{}", slug.trim_end_matches("/index"))
524 }
525 ("book", slug) => format!("/book/{slug}"),
526 ("docs", "index") => "/docs".to_string(),
527 ("docs", slug) if slug.ends_with("/index") => {

Callers 1

push_docFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected