Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions hdf5-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::convert::TryInto;
use std::env;
use std::error::Error;
use std::fmt::{self, Debug, Display};
use std::fmt::{self, Debug};
use std::fs;
use std::os::raw::{c_int, c_uint};
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -80,17 +80,6 @@ fn is_msvc() -> bool {
std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "msvc"
}

#[derive(Clone, Debug)]
struct RuntimeError(String);

impl Error for RuntimeError {}

impl Display for RuntimeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "HDF5 runtime error: {}", self.0)
}
}

#[allow(non_snake_case, non_camel_case_types)]
fn get_runtime_version_single<P: AsRef<Path>>(path: P) -> Result<Version, Box<dyn Error>> {
type H5open_t = unsafe extern "C" fn() -> c_int;
Expand Down Expand Up @@ -283,7 +272,7 @@ mod pkgconf {
for dir in &library.include_paths {
if is_inc_dir(dir) {
config.inc_dir = Some(dir.into());
config.link_paths = library.link_paths.clone();
config.link_paths.clone_from(&library.link_paths);
break;
}
}
Expand Down
Loading