From 05287689476016bf877eb6f38730a14d40cd7bf1 Mon Sep 17 00:00:00 2001 From: "J. Hinchliffe" Date: Sun, 29 Jun 2025 01:43:31 +0100 Subject: [PATCH] fmt: ran 'cargo fmt'. --- assembler/src/args.rs | 3 ++- assembler/src/context.rs | 3 ++- common/src/instructions/errors.rs | 4 +++- dsa_editor/src/lib.rs | 11 ++++++----- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/assembler/src/args.rs b/assembler/src/args.rs index b3d67cb..aaeb664 100644 --- a/assembler/src/args.rs +++ b/assembler/src/args.rs @@ -5,7 +5,8 @@ pub struct Args { /// The output format to assemble to. Currently just ELF or a flat binary. #[arg(value_enum)] output_format: Option, - /// Whether the relocatable object files should be statically linked into a single executable or library. + /// Whether the relocatable object files should be statically linked into a single + /// executable or library. link: bool, } diff --git a/assembler/src/context.rs b/assembler/src/context.rs index eed437b..ec9f821 100644 --- a/assembler/src/context.rs +++ b/assembler/src/context.rs @@ -18,7 +18,8 @@ impl Default for AssemblerContext { } impl AssemblerContext { - #[must_use] pub fn new() -> Self { + #[must_use] + pub fn new() -> Self { Self { symbol_table: RwLock::new(SymbolTable::new()), module_registry: RwLock::new(ModuleRegistry::new()), diff --git a/common/src/instructions/errors.rs b/common/src/instructions/errors.rs index 8961ae5..995124a 100644 --- a/common/src/instructions/errors.rs +++ b/common/src/instructions/errors.rs @@ -39,7 +39,9 @@ impl std::fmt::Display for InstructionDecodeError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::InvalidOpcode(code) => write!(f, "invalid opcode, got {code:x}")?, - Self::InvalidArgument(err) => write!(f, "invalid arguments, got an error {err}")?, + Self::InvalidArgument(err) => { + write!(f, "invalid arguments, got an error {err}")? + } } Ok(()) diff --git a/dsa_editor/src/lib.rs b/dsa_editor/src/lib.rs index e9dd0ad..72f169c 100644 --- a/dsa_editor/src/lib.rs +++ b/dsa_editor/src/lib.rs @@ -160,11 +160,12 @@ impl CodeEditor { /// Stick to bottom /// The scroll handle will stick to the bottom position even while the content size - /// changes dynamically. This can be useful to simulate terminal UIs or log/info scrollers. - /// The scroll handle remains stuck until user manually changes position. Once "unstuck" - /// it will remain focused on whatever content viewport the user left it on. If the scroll - /// handle is dragged to the bottom it will again become stuck and remain there until manually - /// pulled from the end position. + /// changes dynamically. This can be useful to simulate terminal UIs or log/info + /// scrollers. The scroll handle remains stuck until user manually changes + /// position. Once "unstuck" it will remain focused on whatever content viewport + /// the user left it on. If the scroll handle is dragged to the bottom it will + /// again become stuck and remain there until manually pulled from the end + /// position. /// /// **Default: false** pub fn stick_to_bottom(self, stick_to_bottom: bool) -> Self {