Move doc comments before attributes

This commit is contained in:
Alexander Niederbühl 2020-06-07 14:06:15 +02:00
parent 75d44ca296
commit bfe212b3de
1 changed files with 2 additions and 2 deletions

View File

@ -60,14 +60,14 @@ features = ["extension-module"]
use pyo3::prelude::*;
use pyo3::wrap_pyfunction;
#[pyfunction]
/// Formats the sum of two numbers as string.
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
#[pymodule]
/// A Python module implemented in Rust.
#[pymodule]
fn string_sum(py: Python, m: &PyModule) -> PyResult<()> {
m.add_wrapped(wrap_pyfunction!(sum_as_string))?;