fix: clippy cleanup
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user