Merge pull request #2581 from bakaq/fix_hostname_feature

Fix not compiling without hostname feature
This commit is contained in:
Mark Thom
2024-09-29 21:09:22 -06:00
committed by GitHub

View File

@@ -1772,7 +1772,7 @@ impl Machine {
self.machine_st.fail = true; self.machine_st.fail = true;
} }
#[cfg(not(target_arch = "wasm32"))] #[cfg(all(not(target_arch = "wasm32"), feature = "hostname"))]
#[inline(always)] #[inline(always)]
pub(crate) fn current_hostname(&mut self) { pub(crate) fn current_hostname(&mut self) {
if let Ok(host) = hostname::get() { if let Ok(host) = hostname::get() {
@@ -1789,7 +1789,7 @@ impl Machine {
self.machine_st.fail = true; self.machine_st.fail = true;
} }
#[cfg(target_arch = "wasm32")] #[cfg(any(target_arch = "wasm32", not(feature = "hostname")))]
pub(crate) fn current_hostname(&mut self) { pub(crate) fn current_hostname(&mut self) {
unimplemented!() unimplemented!()
} }