From 783bb350b4733956f2c02ea0ef0cc8c25bc18d5c Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Sun, 14 Jul 2024 23:03:29 +0200 Subject: [PATCH] fixes --- src/lib.rs | 10 +++++++++- src/main.rs | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index fd7d1a8..a3fa7a2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,7 +121,15 @@ pub fn glibc_version() -> Option<(u32, u32)> { /// Detect the current version of `musl` `libc` by inspecting the `/lib/ld-musl-*.so.1` loaders. pub fn musl_libc_version() -> Option<(u32, u32)> { - for arch in ["x86_64", "aarch64", "i386", "armhf", "arm", "powerpc64le", "s390x"] { + for arch in [ + "x86_64", + "aarch64", + "i386", + "armhf", + "arm", + "powerpc64le", + "s390x", + ] { let loader = PathBuf::from(format!("/lib/ld-musl-{arch}.so.1")); if !loader.exists() { continue; diff --git a/src/main.rs b/src/main.rs index 9e1dcb9..8afbdf1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,3 @@ -fn main() { - println!("{:?}", libc_detector::libc_version()); -} \ No newline at end of file +fn main() { + println!("{:?}", libc_detector::libc_version()); +}