MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / http_url_for_host

Function http_url_for_host

packages/server/src/main.rs:2912–2919  ·  view source on GitHub ↗
(host: &str, port: u16)

Source from the content-addressed store, hash-verified

2910}
2911
2912fn http_url_for_host(host: &str, port: u16) -> String {
2913 let host = host.trim();
2914 if host.contains(':') && !host.starts_with('[') && !host.ends_with(']') {
2915 format!("http://[{host}]:{port}")
2916 } else {
2917 format!("http://{host}:{port}")
2918 }
2919}
2920
2921fn ui_url_from_base(mut url: String, selector: Option<&str>) -> String {
2922 if let Some(selector) = selector.filter(|value| !value.trim().is_empty()) {

Callers 5

command_service_urlFunction · 0.85
service_addressesFunction · 0.85
from_serviceMethod · 0.85
pairing_addressesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected