From 6fcc792b83f715644c041f728049de65f7da2e38 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 4 Feb 2020 04:00:10 +0200 Subject: [PATCH] Remove src/python In preparation for publishing meli as a separate crate on crates.io. src/python was never used for anything, so remove it. --- src/python/mod.rs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/python/mod.rs diff --git a/src/python/mod.rs b/src/python/mod.rs deleted file mode 100644 index e3e9c9a0b..000000000 --- a/src/python/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![cfg(feature = "python")] -use pyo3::prelude::*; - -#[pymodinit(pythonmeli)] -fn pythonmeli(py: Python, m: &PyModule) -> PyResult<()> { - // pyo3 aware function. All of our python interface could be declared in a separate module. - // Note that the `#[pyfn()]` annotation automatically converts the arguments from - // Python objects to Rust values; and the Rust return value back into a Python object. - #[pyfn(m, "sum_as_string")] - fn sum_as_string_py(_py: Python, a: i64, b: i64) -> PyResult { - let out = sum_as_string(a, b); - Ok(out) - } - - Ok(()) -} - -// logic implemented as a normal rust function -fn sum_as_string(a: i64, b: i64) -> String { - format!("{}", a + b).to_string() -}