fix StorePath not using ToNixideResult
This commit is contained in:
parent
6159645bf8
commit
075c315fe7
1 changed files with 2 additions and 2 deletions
|
|
@ -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<RefCell<Store>>, path: &str) -> NixideResult<Self> {
|
||||
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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue