fix: clippy cleanup

This commit is contained in:
Nova
2025-06-29 20:01:05 -07:00
parent 0abc38c83a
commit 07e9474c79
6 changed files with 13 additions and 8 deletions

View File

@@ -136,7 +136,7 @@ impl AliasList {
let Ok(aspect2) = node.get_aspect::<A>() else {
return false;
};
Arc::as_ptr(&aspect2) == (aspect as *const A)
std::ptr::eq(Arc::as_ptr(&aspect2), aspect)
})
}
pub fn get_aliases(&self) -> Vec<Arc<Node>> {
@@ -150,7 +150,7 @@ impl AliasList {
let Ok(aspect2) = original.get_aspect::<A>() else {
return false;
};
Arc::as_ptr(&aspect2) != (aspect as *const A)
!std::ptr::eq(Arc::as_ptr(&aspect2), aspect)
})
}
}

View File

@@ -152,7 +152,7 @@ pub fn process_input() {
a.handler_order
.lock()
.iter()
.any(|h| h.ptr_eq(&Arc::downgrade(&handler)))
.any(|h| h.ptr_eq(&Arc::downgrade(handler)))
})
// filter out methods without the proper alias
.filter_map(|m| {
@@ -168,7 +168,7 @@ pub fn process_input() {
a.set_enabled(true);
})
// serialize the data
.map(|(a, m)| (a.clone(), m.serialize(a.get_id(), &handler)))
.map(|(a, m)| (a.clone(), m.serialize(a.get_id(), handler)))
.unzip::<_, _, Vec<_>, Vec<_>>();
drop(ser_span);

View File

@@ -177,7 +177,7 @@ impl Node {
message: Message,
) -> Result<(), ScenegraphError> {
if let Ok(alias) = self.get_aspect::<Alias>() {
if !alias.info.server_signals.iter().any(|e| *e == method) {
if !alias.info.server_signals.contains(&method) {
return Err(ScenegraphError::MemberNotFound);
}
alias
@@ -208,7 +208,7 @@ impl Node {
response: MethodResponseSender,
) {
if let Ok(alias) = self.get_aspect::<Alias>() {
if !alias.info.server_methods.iter().any(|e| *e == method) {
if !alias.info.server_methods.contains(&method) {
response.send(Err(ScenegraphError::MemberNotFound));
return;
}