Move doc comments before attributes
This commit is contained in:
parent
75d44ca296
commit
bfe212b3de
|
@ -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))?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue