File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " pymath"
3
- version = " 0.0.1 "
3
+ version = " 0.0.2 "
4
4
edition = " 2024"
5
5
description = " A binary representation compatible Rust implementation of Python's math library."
6
6
license = " PSF-2.0"
@@ -16,7 +16,6 @@ license = "PSF-2.0"
16
16
mul_add = []
17
17
18
18
[dependencies ]
19
- errno = " 0.3"
20
19
libc = " 0.2"
21
20
22
21
[dev-dependencies ]
Original file line number Diff line number Diff line change
1
+ use std:: ffi:: c_int;
2
+
1
3
// The values are defined in libc
2
4
#[ derive( Debug , PartialEq , Eq ) ]
3
5
pub enum Error {
@@ -7,10 +9,10 @@ pub enum Error {
7
9
8
10
pub type Result < T > = std:: result:: Result < T , Error > ;
9
11
10
- impl TryFrom < libc :: c_int > for Error {
11
- type Error = libc :: c_int ;
12
+ impl TryFrom < c_int > for Error {
13
+ type Error = c_int ;
12
14
13
- fn try_from ( value : libc :: c_int ) -> std:: result:: Result < Self , Self :: Error > {
15
+ fn try_from ( value : c_int ) -> std:: result:: Result < Self , Self :: Error > {
14
16
match value {
15
17
33 => Ok ( Error :: EDOM ) ,
16
18
34 => Ok ( Error :: ERANGE ) ,
You can’t perform that action at this time.
0 commit comments