Skip to content

Commit 329fd17

Browse files
committed
apply style suggestions
1 parent 64a127c commit 329fd17

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/types/num.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ impl PyInt {
2424
/// Creates a new Python int object.
2525
///
2626
/// Panics if out of memory.
27-
pub fn new<
28-
'a,
27+
pub fn new<'a, T>(py: Python<'a>, i: T) -> Bound<'a, PyInt>
28+
where
2929
T: IntoPyObject<'a, Target = PyInt, Output = Bound<'a, PyInt>, Error = Infallible>,
30-
>(
31-
py: Python<'a>,
32-
i: T,
33-
) -> Bound<'a, PyInt> {
34-
T::into_pyobject(i, py).unwrap()
30+
{
31+
match T::into_pyobject(i, py) {
32+
Ok(v) => v,
33+
Err(never) => match never {},
34+
}
3535
}
3636
}
3737

0 commit comments

Comments
 (0)