From 9ff25c693cb027d1029333dd881888b1e422f728 Mon Sep 17 00:00:00 2001 From: Bogdan Opanchuk Date: Wed, 21 Apr 2021 21:01:46 -0700 Subject: [PATCH] Remove unwraps from Python module initialization --- umbral-pre-python/src/lib.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/umbral-pre-python/src/lib.rs b/umbral-pre-python/src/lib.rs index 7d9d9989..531c456a 100644 --- a/umbral-pre-python/src/lib.rs +++ b/umbral-pre-python/src/lib.rs @@ -306,13 +306,10 @@ fn _umbral(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; - m.add_function(wrap_pyfunction!(encrypt, m)?).unwrap(); - m.add_function(wrap_pyfunction!(decrypt_original, m)?) - .unwrap(); - m.add_function(wrap_pyfunction!(generate_kfrags, m)?) - .unwrap(); - m.add_function(wrap_pyfunction!(reencrypt, m)?).unwrap(); - m.add_function(wrap_pyfunction!(decrypt_reencrypted, m)?) - .unwrap(); + m.add_function(wrap_pyfunction!(encrypt, m)?)?; + m.add_function(wrap_pyfunction!(decrypt_original, m)?)?; + m.add_function(wrap_pyfunction!(generate_kfrags, m)?)?; + m.add_function(wrap_pyfunction!(reencrypt, m)?)?; + m.add_function(wrap_pyfunction!(decrypt_reencrypted, m)?)?; Ok(()) }