fmt: ran 'cargo fmt'.
This commit is contained in:
@@ -5,7 +5,8 @@ pub struct Args {
|
|||||||
/// The output format to assemble to. Currently just ELF or a flat binary.
|
/// The output format to assemble to. Currently just ELF or a flat binary.
|
||||||
#[arg(value_enum)]
|
#[arg(value_enum)]
|
||||||
output_format: Option<OutputFormat>,
|
output_format: Option<OutputFormat>,
|
||||||
/// 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,
|
link: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ impl Default for AssemblerContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl AssemblerContext {
|
impl AssemblerContext {
|
||||||
#[must_use] pub fn new() -> Self {
|
#[must_use]
|
||||||
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
symbol_table: RwLock::new(SymbolTable::new()),
|
symbol_table: RwLock::new(SymbolTable::new()),
|
||||||
module_registry: RwLock::new(ModuleRegistry::new()),
|
module_registry: RwLock::new(ModuleRegistry::new()),
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ impl std::fmt::Display for InstructionDecodeError {
|
|||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Self::InvalidOpcode(code) => write!(f, "invalid opcode, got {code:x}")?,
|
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(())
|
Ok(())
|
||||||
|
|||||||
@@ -160,11 +160,12 @@ impl CodeEditor {
|
|||||||
|
|
||||||
/// Stick to bottom
|
/// Stick to bottom
|
||||||
/// The scroll handle will stick to the bottom position even while the content size
|
/// 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.
|
/// changes dynamically. This can be useful to simulate terminal UIs or log/info
|
||||||
/// The scroll handle remains stuck until user manually changes position. Once "unstuck"
|
/// scrollers. The scroll handle remains stuck until user manually changes
|
||||||
/// it will remain focused on whatever content viewport the user left it on. If the scroll
|
/// position. Once "unstuck" it will remain focused on whatever content viewport
|
||||||
/// handle is dragged to the bottom it will again become stuck and remain there until manually
|
/// the user left it on. If the scroll handle is dragged to the bottom it will
|
||||||
/// pulled from the end position.
|
/// again become stuck and remain there until manually pulled from the end
|
||||||
|
/// position.
|
||||||
///
|
///
|
||||||
/// **Default: false**
|
/// **Default: false**
|
||||||
pub fn stick_to_bottom(self, stick_to_bottom: bool) -> Self {
|
pub fn stick_to_bottom(self, stick_to_bottom: bool) -> Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user