From ecd88cd4c1596baaa83217ed618f58b49b588908 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Fri, 10 Apr 2026 10:14:36 +1000 Subject: [PATCH] fix Rc> issues --- nixide/src/expr/realised_string.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixide/src/expr/realised_string.rs b/nixide/src/expr/realised_string.rs index 8cf08a4..5e10470 100644 --- a/nixide/src/expr/realised_string.rs +++ b/nixide/src/expr/realised_string.rs @@ -1,6 +1,7 @@ use std::cell::RefCell; use std::ffi::c_char; use std::ptr::NonNull; +use std::rc::Rc; use crate::errors::ErrorContext; use crate::expr::values::NixString; @@ -74,15 +75,18 @@ impl<'a> RealisedString<'a> { Ok(Self { inner: RefCell::new(inner), - path: Self::parse_path(inner.as_ptr(), &state.store_ref().borrow()), + path: Self::parse_path(inner.as_ptr(), state.store_ref().clone()), children: LazyArray::new( size, - Box::new(|_| StorePath::fake_path(&state.store_ref().borrow()).unwrap()), + Box::new(|_| StorePath::fake_path(state.store_ref().clone()).unwrap()), ), }) } - fn parse_path(realised_string: *mut sys::NixRealisedString, store: &Store) -> StorePath { + fn parse_path( + realised_string: *mut sys::NixRealisedString, + store: Rc>, + ) -> StorePath { let buffer_ptr = unsafe { sys::nix_realised_string_get_buffer_start(realised_string) }; let buffer_size = unsafe { sys::nix_realised_string_get_buffer_size(realised_string) };