mirror of https://github.com/rwf2/Rocket.git
Update deprecated 'trim_right()' to 'trim_end()'.
This commit is contained in:
parent
f0c6c9b26f
commit
fbcb99669e
|
@ -3,7 +3,7 @@ use rocket::local::Client;
|
||||||
use rocket::http::{Status, ContentType};
|
use rocket::http::{Status, ContentType};
|
||||||
|
|
||||||
fn extract_id(from: &str) -> Option<String> {
|
fn extract_id(from: &str) -> Option<String> {
|
||||||
from.rfind('/').map(|i| &from[(i + 1)..]).map(|s| s.trim_right().to_string())
|
from.rfind('/').map(|i| &from[(i + 1)..]).map(|s| s.trim_end().to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue