chore: make clippy happy

This commit is contained in:
Jonathan Kelley committed 2022-11-29 16:46:25 -05:00
1 parent 7c3d308ab5
commit 03aea885cf
12 files changed
+67 -103

No files matched your search

+2 -2
View File
@@ -134,7 +134,7 @@ impl ScopeState {
/// This is useful for traversing the tree outside of the VirtualDom, such as in a custom renderer or in SSR.
///
/// Panics if the tree has not been built yet.
pub fn root_node<'a>(&'a self) -> &'a RenderReturn<'a> {
pub fn root_node(&self) -> &RenderReturn {
self.try_root_node()
.expect("The tree has not been built yet. Make sure to call rebuild on the tree before accessing its nodes.")
}
@@ -144,7 +144,7 @@ impl ScopeState {
/// This is useful for traversing the tree outside of the VirtualDom, such as in a custom renderer or in SSR.
///
/// Returns [`None`] if the tree has not been built yet.
pub fn try_root_node<'a>(&'a self) -> Option<&'a RenderReturn<'a>> {
pub fn try_root_node(&self) -> Option<&RenderReturn> {
let ptr = self.current_frame().node.get();
if ptr.is_null() {