MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / join_path

Function join_path

ra-rpc/src/openapi.rs:449–459  ·  view source on GitHub ↗
(base: &str, segment: &str)

Source from the content-addressed store, hash-verified

447}
448
449fn join_path(base: &str, segment: &str) -> String {
450 if base == "/" {
451 format!("/{}", segment.trim_start_matches('/'))
452 } else {
453 format!(
454 "{}/{}",
455 base.trim_end_matches('/'),
456 segment.trim_start_matches('/')
457 )
458 }
459}
460
461fn map_to_value(map: BTreeMap<String, Value>) -> Value {
462 let mut json_map = Map::new();

Callers 1

generate_documentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected