Skip to content

Commit

Permalink
change back to inline assignment itself
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuSanal committed May 17, 2024
1 parent ca0e852 commit 97c6ed8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,10 @@ impl Server {
is_const: bool,
) {

let second_route: String;

if route.ends_with("/") {
second_route = route[0..route.len() - 1].to_string();
let second_route: String = if route.ends_with("/") {
route[0..route.len() - 1].to_string()
} else {
second_route = format!("{}/", route);
format!("{}/", route)
};

self._add_route(py, route_type, route, function.clone(), is_const);
Expand Down

0 comments on commit 97c6ed8

Please sign in to comment.