diff --git a/zeroconf-tokio/src/browser.rs b/zeroconf-tokio/src/browser.rs index 5b4f2e6..bdcc376 100644 --- a/zeroconf-tokio/src/browser.rs +++ b/zeroconf-tokio/src/browser.rs @@ -108,7 +108,7 @@ mod tests { let service_type = ServiceType::new("http", "tcp").unwrap(); let mut service = MdnsService::new(service_type.clone(), 8080); - service.set_name("test_service".into()); + service.set_name("test_service"); Self::new( vec![MdnsServiceAsync::new(service).unwrap()], @@ -187,8 +187,8 @@ mod tests { let mut service1 = MdnsService::new(service_type.clone(), 8080); let mut service2 = MdnsService::new(service_type.clone(), 8081); - service1.set_name("test_service_1".into()); - service2.set_name("test_service_2".into()); + service1.set_name("test_service_1"); + service2.set_name("test_service_2"); let services = vec![ MdnsServiceAsync::new(service1).unwrap(), diff --git a/zeroconf-tokio/src/event_processor.rs b/zeroconf-tokio/src/event_processor.rs index 44bfa07..63b3f9d 100644 --- a/zeroconf-tokio/src/event_processor.rs +++ b/zeroconf-tokio/src/event_processor.rs @@ -12,6 +12,7 @@ use tokio::task::JoinHandle; use zeroconf::{prelude::*, EventLoop}; /// Event processor for mDNS event loop. +#[derive(Default)] pub struct EventProcessor { running: Arc, join_handle: Option>, diff --git a/zeroconf-tokio/src/service.rs b/zeroconf-tokio/src/service.rs index ef010a4..b4e25aa 100644 --- a/zeroconf-tokio/src/service.rs +++ b/zeroconf-tokio/src/service.rs @@ -90,7 +90,7 @@ mod tests { let service_type = ServiceType::new("http", "tcp").unwrap(); let mut service = MdnsService::new(service_type, 8080); - service.set_name("test_service".into()); + service.set_name("test_service"); Self { service: MdnsServiceAsync::new(service).unwrap(),