Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,9 @@ impl SacnSourceInternal {
/// `UnsupportedIpVersion`: Returned if the `SockAddr` is not IPv4 or IPv6.
fn with_cid_ip(name: &str, cid: Uuid, ip: SocketAddr) -> Result<SacnSourceInternal> {
let socket = if ip.is_ipv4() {
Socket::new(Domain::IPV4, Type::DGRAM, None).unwrap()
Socket::new(Domain::IPV4, Type::DGRAM, None)?
} else if ip.is_ipv6() {
Socket::new(Domain::IPV6, Type::DGRAM, None).unwrap()
Socket::new(Domain::IPV6, Type::DGRAM, None)?
} else {
return Err(SacnError::UnsupportedIpVersion(
"Address to create SacnSource is not IPv4 or IPv6".to_string(),
Expand Down
Loading