Skip to content

Commit

Permalink
Use from_int to generate a custom class
Browse files Browse the repository at this point in the history
  • Loading branch information
andreilitvin committed Jul 26, 2024
1 parent eedf697 commit 6fc803c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rs-matter/src/mdns/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use super::Service;
/// See https://datatracker.ietf.org/doc/html/rfc6762#section-10.2 for details.
fn dns_class_with_flush(dns_class: Class) -> Class {
const RESOURCE_RECORD_CACHE_FLUSH_BIT: u16 = 0x8000;
Class::Int(u16::from(dns_class) | RESOURCE_RECORD_CACHE_FLUSH_BIT)
Class::from_int(u16::from(dns_class) | RESOURCE_RECORD_CACHE_FLUSH_BIT)
}

impl From<ShortBuf> for Error {
Expand Down

0 comments on commit 6fc803c

Please sign in to comment.