diff --git a/Cargo.toml b/Cargo.toml index c9e22047..06798679 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ num-traits = "0.1" pyo3cls = { path = "pyo3cls" } [build-dependencies] -regex = "0.1" +regex = "0.2" [features] default = ["nightly"] diff --git a/build.rs b/build.rs index 801ee67d..8f64b5ce 100644 --- a/build.rs +++ b/build.rs @@ -226,8 +226,8 @@ fn get_interpreter_version(line: &str) -> Result { let version_re = Regex::new(r"\((\d+), (\d+)\)").unwrap(); match version_re.captures(&line) { Some(cap) => Ok(PythonVersion { - major: cap.at(1).unwrap().parse().unwrap(), - minor: Some(cap.at(2).unwrap().parse().unwrap()) + major: cap.get(1).unwrap().as_str().parse().unwrap(), + minor: Some(cap.get(2).unwrap().as_str().parse().unwrap()) }), None => Err( format!("Unexpected response to version query {}", line))