Fix use of ends_with

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-06 23:20:09 +10:00
parent 3f7f293b78
commit 44b1bdbfe5
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -120,13 +120,13 @@ mod linux {
}
const fn parse_abi() -> &'static str {
if TARGET.endswith("abi64") {
if TARGET.ends_with("abi64") {
"abi64"
} else if TARGET.endswith("eabi") {
} else if TARGET.ends_with("eabi") {
"eabi"
} else if TARGET.endswith("eabihf") {
} else if TARGET.ends_with("eabihf") {
"eabihf"
} else if TARGET.endswith("gnu") || TARGET.endswith("musl") {
} else if TARGET.ends_with("gnu") || TARGET.ends_with("musl") {
""
} else {
panic!("Unknown abi")