From f41be070bb10d6dd0ca8e8180c7bf87d635d5dd0 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 17 Jun 2023 23:33:19 +0200 Subject: [PATCH] fmt --- rustfmt.toml | 2 +- src/dwarf/parse.rs | 3 +-- src/lib.rs | 3 +-- src/stdext.rs | 3 +-- src/walk/fp.rs | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index 42b068b..33c58ed 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1,3 @@ reorder_imports = true -imports_granularity = "Module" +imports_granularity = "Crate" wrap_comments = true diff --git a/src/dwarf/parse.rs b/src/dwarf/parse.rs index f9b016a..872a0f3 100644 --- a/src/dwarf/parse.rs +++ b/src/dwarf/parse.rs @@ -29,8 +29,7 @@ mod tests; use core::ffi::CStr; -use alloc::format; -use alloc::string::String; +use alloc::{format, string::String}; /// The dwarf is invalid. This is fatal and should never happen. #[derive(Debug)] diff --git a/src/lib.rs b/src/lib.rs index 49249be..3806d7f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,8 +3,7 @@ extern crate alloc; -use core::ffi; -use core::sync::atomic::AtomicPtr; +use core::{ffi, sync::atomic::AtomicPtr}; // Get the macros into our local prelude. #[macro_use] diff --git a/src/stdext.rs b/src/stdext.rs index 4bd0579..4222fed 100644 --- a/src/stdext.rs +++ b/src/stdext.rs @@ -1,5 +1,4 @@ -use core::fmt::Write; -use core::{ffi, fmt}; +use core::{ffi, fmt, fmt::Write}; pub struct LibCStdoutWriter; diff --git a/src/walk/fp.rs b/src/walk/fp.rs index 65d4342..a3b909d 100644 --- a/src/walk/fp.rs +++ b/src/walk/fp.rs @@ -1,7 +1,6 @@ //! Test frame pointer walker. Not very good. -use crate::arch::get_rbp; -use crate::stdext::trace; +use crate::{arch::get_rbp, stdext::trace}; pub(crate) unsafe fn walk() { let mut current_rbp = get_rbp().0.cast::();