Fix the build warning of deprecated trim_right_matches (#2662)
This commit is contained in:
committed by
Ignotus Peverell
parent
699d85a799
commit
608973c498
@@ -79,7 +79,7 @@ impl Handler for PeerHandler {
|
||||
}
|
||||
}
|
||||
fn post(&self, req: Request<Body>) -> ResponseFuture {
|
||||
let mut path_elems = req.uri().path().trim_right_matches('/').rsplit('/');
|
||||
let mut path_elems = req.uri().path().trim_end_matches('/').rsplit('/');
|
||||
let command = match path_elems.next() {
|
||||
None => return response(StatusCode::BAD_REQUEST, "invalid url"),
|
||||
Some(c) => c,
|
||||
|
||||
Reference in New Issue
Block a user