Skip to content

Commit 5246d36

Browse files
author
Helena Jäger
committed
fixed module initialization
1 parent 8c2b20b commit 5246d36

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1+
use map::{ObstacleMap, ObstacleMapConfig};
2+
use obstacle::RoundObstacle;
13
use pyo3::prelude::*;
24

35
mod map;
46
mod obstacle;
57
mod planner;
68

7-
/// Formats the sum of two numbers as string.
8-
#[pyfunction]
9-
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
10-
Ok((a + b).to_string())
11-
}
12-
13-
/// A Python module implemented in Rust.
149
#[pymodule]
1510
fn bitbots_pathplanning_rust(m: &Bound<'_, PyModule>) -> PyResult<()> {
16-
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
11+
m.add_class::<RoundObstacle>()?;
12+
m.add_class::<ObstacleMap>()?;
13+
m.add_class::<ObstacleMapConfig>()?;
1714
Ok(())
1815
}

0 commit comments

Comments
 (0)