diff --git a/src/process.rs b/src/process.rs index 097eb3c21..c85020143 100644 --- a/src/process.rs +++ b/src/process.rs @@ -19,8 +19,6 @@ pub async fn handle_message(process_object: Py, mut stream: TcpStream) { let coro = handler.call0().unwrap(); PyFunction::CoRoutine(coro.into()) } else { - // let s: &str = handler.call0().unwrap().extract().unwrap(); - // PyFunction::SyncFunction(String::from(s)) PyFunction::SyncFunction(handler.into()) } }); @@ -49,7 +47,6 @@ pub async fn handle_message(process_object: Py, mut stream: TcpStream) { .unwrap(), }; - // let output = op.await.unwrap(); let status_line = "HTTP/1.1 200 OK"; let len = contents.len(); diff --git a/src/server.rs b/src/server.rs index 20eebb5af..0591df34a 100644 --- a/src/server.rs +++ b/src/server.rs @@ -50,17 +50,8 @@ impl Server { }; } - pub fn add_route( - &self, - route_type: &str, - route: String, - handler: Py, - ) { - // Python::with_gil(|py| { - // let py_dict: &PyDict = py_obj.as_ref(py); - // println!("{}", py_dict.get_item("is_coroutine").unwrap()); - // }); - println!("{} {} ", route_type, route); + pub fn add_route(&self, route_type: &str, route: String, handler: Py) { + println!("Route added for {} {} ", route_type, route); let route = Route::new(RouteType::Route((route, route_type.to_string()))); self.router.add_route(route_type, route, handler); }