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

Function local_host_name

packages/server/src/config.rs:81–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81fn local_host_name() -> String {
82 platform_host_name()
83 .and_then(|value| {
84 value
85 .trim()
86 .trim_end_matches(".local")
87 .trim_end_matches('.')
88 .split('.')
89 .next()
90 .filter(|value| !value.is_empty())
91 .map(ToOwned::to_owned)
92 })
93 .unwrap_or_else(|| "localhost".to_owned())
94}
95
96#[cfg(unix)]
97fn platform_host_name() -> Option<String> {

Callers 1

newMethod · 0.85

Calls 2

platform_host_nameFunction · 0.85
is_emptyMethod · 0.80

Tested by

no test coverage detected