Skip to content

Commit

Permalink
Merge pull request #6 from JonathanPlasse/implement-error-for-pep440e…
Browse files Browse the repository at this point in the history
…rror

Implement Error trait for Pep440Error
  • Loading branch information
konstin committed Mar 13, 2023
2 parents 08f3e6b + e889a35 commit a8fef4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#[cfg(feature = "pyo3")]
use pyo3::{pymodule, types::PyModule, PyResult, Python};
use std::error::Error;
use std::fmt::{Display, Formatter};
pub use version::{LocalSegment, Operator, PreRelease, Version};
pub use version_specifier::{parse_version_specifiers, VersionSpecifier, VersionSpecifiers};
Expand Down Expand Up @@ -73,6 +74,8 @@ impl Display for Pep440Error {
}
}

impl Error for Pep440Error {}

#[cfg(feature = "pyo3")]
#[pymodule]
fn _pep440_rs(_py: Python, module: &PyModule) -> PyResult<()> {
Expand Down

0 comments on commit a8fef4e

Please sign in to comment.