Skip to content

Commit 0111ec8

Browse files
committed
update from deprecated function call
1 parent 23bf84c commit 0111ec8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

api/src/handlers/peers_api.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl Handler for PeerHandler {
7979
}
8080
}
8181
fn post(&self, req: Request<Body>) -> ResponseFuture {
82-
let mut path_elems = req.uri().path().trim_right_matches('/').rsplit('/');
82+
let mut path_elems = req.uri().path().trim_end_matches('/').rsplit('/');
8383
let command = match path_elems.next() {
8484
None => return response(StatusCode::BAD_REQUEST, "invalid url"),
8585
Some(c) => c,

core/src/core.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ pub fn amount_to_hr_string(amount: u64, truncate: bool) -> String {
9595
if truncate {
9696
let nzeros = hr.chars().rev().take_while(|x| x == &'0').count();
9797
if nzeros < *WIDTH {
98-
return hr.trim_right_matches('0').to_string();
98+
return hr.trim_end_matches('0').to_string();
9999
} else {
100-
return format!("{}0", hr.trim_right_matches('0'));
100+
return format!("{}0", hr.trim_end_matches('0'));
101101
}
102102
}
103103
hr

wallet/src/controller.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ where
300300
match req
301301
.uri()
302302
.path()
303-
.trim_right_matches("/")
303+
.trim_end_matches("/")
304304
.rsplit("/")
305305
.next()
306306
.unwrap()
@@ -553,7 +553,7 @@ where
553553
match req
554554
.uri()
555555
.path()
556-
.trim_right_matches("/")
556+
.trim_end_matches("/")
557557
.rsplit("/")
558558
.next()
559559
.unwrap()
@@ -684,7 +684,7 @@ where
684684
match req
685685
.uri()
686686
.path()
687-
.trim_right_matches("/")
687+
.trim_end_matches("/")
688688
.rsplit("/")
689689
.next()
690690
.unwrap()

0 commit comments

Comments
 (0)