1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 09:07:44 +00:00

fix redundant_closure in syntax/node.rs

This commit is contained in:
Domenic Quirl 2022-01-12 20:41:33 +01:00
parent 1b08c9405e
commit 856b42ac9b

View file

@ -445,7 +445,7 @@ impl<L: Language, D> SyntaxNode<L, D> {
/// Returns the data associated with this node, if any. /// Returns the data associated with this node, if any.
pub fn get_data(&self) -> Option<Arc<D>> { pub fn get_data(&self) -> Option<Arc<D>> {
let ptr = self.data().data.read(); let ptr = self.data().data.read();
(*ptr).as_ref().map(|ptr| Arc::clone(ptr)) (*ptr).as_ref().map(Arc::clone)
} }
/// Removes the data associated with this node. /// Removes the data associated with this node.