Skip to content

Commit

Permalink
autocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Sep 23, 2023
1 parent a8b3497 commit 0c2cd26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/adana_script/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,13 @@ fn compute_recur(
parent
};

let res = unsafe {

unsafe {
let lib = NativeLibrary::new(
file_path.as_path(),
)?;
Ok(Primitive::NativeLibrary(Rc::new(lib)))
};
res
}
}
_ => Ok(Primitive::Error(
"wrong include call".to_string(),
Expand Down
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ fn main() -> anyhow::Result<()> {

let path_to_shared_lib: PathBuf = args
.iter()
.find_map(|a| {
.map(|a| {
if let Argument::SharedLibPath(slp) = a {
Some(PathBuf::from(&slp))
PathBuf::from(&slp)
} else {
let path_so = get_path_to_shared_libraries()
.context("couldn't determine shared library path")
Expand All @@ -83,9 +83,10 @@ fn main() -> anyhow::Result<()> {
.context("could not create directory for shared lib")
.unwrap();
}
Some(path_so)
path_so
}
})
.next()
.context("shared lib could not be built")?;

println!();
Expand Down

0 comments on commit 0c2cd26

Please sign in to comment.