From 075c315fe7376967e80203ddcb19720b923907a1 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Tue, 14 Apr 2026 10:09:24 +1000 Subject: [PATCH] fix StorePath not using ToNixideResult --- nixide/src/store/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixide/src/store/path.rs b/nixide/src/store/path.rs index b316997..c0dea21 100644 --- a/nixide/src/store/path.rs +++ b/nixide/src/store/path.rs @@ -6,7 +6,7 @@ use std::rc::Rc; use super::Store; use crate::NixideResult; -use crate::errors::{ErrorContext, new_nixide_error}; +use crate::errors::{ErrorContext, ToNixideResult as _, new_nixide_error}; use crate::stdext::CCharPtrExt as _; use crate::sys; use crate::util::panic_issue_call_failed; @@ -85,7 +85,7 @@ impl StorePath { /// ``` /// pub fn new(store: Rc>, path: &str) -> NixideResult { - let c_path = CString::new(path).or(Err(new_nixide_error!(StringNulByte)))?; + let c_path = CString::new(path).to_nixide_result()?; let inner = wrap::nix_ptr_fn!(|ctx: &ErrorContext| unsafe { sys::nix_store_parse_path(ctx.as_ptr(), store.borrow().as_ptr(), c_path.as_ptr())