Skip to content

Commit a1442d0

Browse files
committed
Remove dead code
1 parent 9f283df commit a1442d0

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/process.rs

-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pub async fn handle_message(process_object: Py<PyAny>, mut stream: TcpStream) {
1919
let coro = handler.call0().unwrap();
2020
PyFunction::CoRoutine(coro.into())
2121
} else {
22-
// let s: &str = handler.call0().unwrap().extract().unwrap();
23-
// PyFunction::SyncFunction(String::from(s))
2422
PyFunction::SyncFunction(handler.into())
2523
}
2624
});
@@ -49,7 +47,6 @@ pub async fn handle_message(process_object: Py<PyAny>, mut stream: TcpStream) {
4947
.unwrap(),
5048
};
5149

52-
// let output = op.await.unwrap();
5350
let status_line = "HTTP/1.1 200 OK";
5451

5552
let len = contents.len();

src/server.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,8 @@ impl Server {
5050
};
5151
}
5252

53-
pub fn add_route(
54-
&self,
55-
route_type: &str,
56-
route: String,
57-
handler: Py<PyAny>,
58-
) {
59-
// Python::with_gil(|py| {
60-
// let py_dict: &PyDict = py_obj.as_ref(py);
61-
// println!("{}", py_dict.get_item("is_coroutine").unwrap());
62-
// });
63-
println!("{} {} ", route_type, route);
53+
pub fn add_route(&self, route_type: &str, route: String, handler: Py<PyAny>) {
54+
println!("Route added for {} {} ", route_type, route);
6455
let route = Route::new(RouteType::Route((route, route_type.to_string())));
6556
self.router.add_route(route_type, route, handler);
6657
}

0 commit comments

Comments
 (0)