Skip to content

Commit 59f45c8

Browse files
committed
Updated output if display implementation
1 parent 14760c9 commit 59f45c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

heos-lib/src/heos_device.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ impl PartialEq for HeosDevice {
193193

194194
impl Display for HeosDevice {
195195
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
196-
write!(f, "{} ({})", self.name, self.base_url)
196+
write!(f, "{} ({})", self.name, match self.base_url.is_empty() {
197+
true => String::from("x.x.x.x"),
198+
false => self.base_url.clone(),
199+
})
197200
}
198201
}

0 commit comments

Comments
 (0)