From 8ebd6c072fe95ee43ab9e0555337b952154aff1e Mon Sep 17 00:00:00 2001 From: Ivan Izaguirre Date: Tue, 9 Jul 2024 20:47:12 +0200 Subject: [PATCH] Use crate instead of super --- src/bdos.rs | 16 ++++++++-------- src/bdos_console.rs | 4 ++-- src/bdos_drive.rs | 4 ++-- src/bdos_environment.rs | 8 ++++---- src/bdos_file.rs | 6 +++--- src/bios.rs | 8 ++++---- src/console_test.rs | 2 +- src/console_unix.rs | 2 +- src/console_windows.rs | 2 +- src/fcb.rs | 2 +- src/run.rs | 20 ++++++++++---------- src/terminal_adm3a.rs | 2 +- 12 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/bdos.rs b/src/bdos.rs index 396593a..9c1381e 100644 --- a/src/bdos.rs +++ b/src/bdos.rs @@ -1,13 +1,13 @@ use iz80::*; -use super::bios::Bios; -use super::bdos_environment::*; -use super::bdos_console; -use super::bdos_drive; -use super::bdos_file; -use super::console_emulator::ConsoleEmulator; -use super::cpm_machine::CpmMachine; -use super::constants::*; +use crate::bios::Bios; +use crate::bdos_environment::*; +use crate::bdos_console; +use crate::bdos_drive; +use crate::bdos_file; +use crate::console_emulator::ConsoleEmulator; +use crate::cpm_machine::CpmMachine; +use crate::constants::*; const BDOS_COMMAND_NAMES: [&str; 106] = [ // 0 diff --git a/src/bdos_console.rs b/src/bdos_console.rs index 1d9873a..1016e34 100644 --- a/src/bdos_console.rs +++ b/src/bdos_console.rs @@ -1,6 +1,6 @@ use iz80::Machine; -use super::bdos_environment::*; -use super::constants::ExecutionResult; +use crate::bdos_environment::*; +use crate::constants::ExecutionResult; pub fn read(env: &mut BdosEnvironment) -> u8 { // The Console Input function reads the next console character to register diff --git a/src/bdos_drive.rs b/src/bdos_drive.rs index 13b60fa..21d9f12 100644 --- a/src/bdos_drive.rs +++ b/src/bdos_drive.rs @@ -1,5 +1,5 @@ -use super::bdos_environment::*; -use super::constants::*; +use crate::bdos_environment::*; +use crate::constants::*; use iz80::Machine; pub fn select(env: &mut BdosEnvironment, selected: u8) { diff --git a/src/bdos_environment.rs b/src/bdos_environment.rs index 5e67234..39dea65 100644 --- a/src/bdos_environment.rs +++ b/src/bdos_environment.rs @@ -1,9 +1,9 @@ use iz80::Machine; -use super::bios::Bios; -use super::console_emulator::ConsoleEmulator; -use super::constants::*; -use super::cpm_machine::*; +use crate::bios::Bios; +use crate::console_emulator::ConsoleEmulator; +use crate::constants::*; +use crate::cpm_machine::*; pub const RECORD_SIZE: usize = 128; pub const DEFAULT_DMA: u16 = 0x0080; diff --git a/src/bdos_file.rs b/src/bdos_file.rs index 60060cd..a3cb17a 100644 --- a/src/bdos_file.rs +++ b/src/bdos_file.rs @@ -7,9 +7,9 @@ use std::io::Write; use std::path::Path; use std::path::PathBuf; -use super::bdos_environment::*; -use super::constants::*; -use super::fcb::*; +use crate::bdos_environment::*; +use crate::constants::*; +use crate::fcb::*; use iz80::Machine; // Many file processing functions return a value in register A that is either diff --git a/src/bios.rs b/src/bios.rs index 95a667a..da6a75e 100644 --- a/src/bios.rs +++ b/src/bios.rs @@ -1,9 +1,9 @@ use iz80::*; -use super::cpm_machine::*; -use super::constants::*; -use super::console_emulator::ConsoleEmulator; -use super::terminal::TerminalEmulator; +use crate::cpm_machine::*; +use crate::constants::*; +use crate::console_emulator::ConsoleEmulator; +use crate::terminal::TerminalEmulator; pub struct Bios { diff --git a/src/console_test.rs b/src/console_test.rs index 4e82215..ff0370c 100644 --- a/src/console_test.rs +++ b/src/console_test.rs @@ -1,7 +1,7 @@ use core::panic; use std::collections::VecDeque; -use super::console_emulator::ConsoleEmulator; +use crate::console_emulator::ConsoleEmulator; pub enum Step <'a> { Input(&'a str), diff --git a/src/console_unix.rs b/src/console_unix.rs index d5a93f1..ebdbd8c 100644 --- a/src/console_unix.rs +++ b/src/console_unix.rs @@ -4,7 +4,7 @@ use std::time::Duration; use termios::*; -use super::console_emulator::ConsoleEmulator; +use crate::console_emulator::ConsoleEmulator; const STDIN_FD: i32 = 0; diff --git a/src/console_windows.rs b/src/console_windows.rs index 6924d10..b6ba843 100644 --- a/src/console_windows.rs +++ b/src/console_windows.rs @@ -6,7 +6,7 @@ use crossterm::event; use crossterm::queue; use crossterm::style; -use super::console_emulator::ConsoleEmulator; +use crate::console_emulator::ConsoleEmulator; pub struct Console { next_char: Option, diff --git a/src/fcb.rs b/src/fcb.rs index 0295354..13ebd29 100644 --- a/src/fcb.rs +++ b/src/fcb.rs @@ -1,5 +1,5 @@ use iz80::Machine; -use super::bdos_environment::BdosEnvironment; +use crate::bdos_environment::BdosEnvironment; /* File Control Block diff --git a/src/run.rs b/src/run.rs index 69a4c83..a035204 100644 --- a/src/run.rs +++ b/src/run.rs @@ -8,16 +8,16 @@ use clap::{Arg, App}; use iz80::*; -use super::bdos::Bdos; -use super::bdos::execute_bdos; -use super::console_emulator::ConsoleEmulator; -use super::bios::Bios; -use super::constants::*; -use super::cpm_machine::CpmMachine; -use super::fcb::*; -use super::terminal::TerminalEmulator; -use super::terminal::Transparent; -use super::terminal_adm3a::Adm3aToAnsi; +use crate::bdos::Bdos; +use crate::bdos::execute_bdos; +use crate::console_emulator::ConsoleEmulator; +use crate::bios::Bios; +use crate::constants::*; +use crate::cpm_machine::CpmMachine; +use crate::fcb::*; +use crate::terminal::TerminalEmulator; +use crate::terminal::Transparent; +use crate::terminal_adm3a::Adm3aToAnsi; // Welcome message const WELCOME: &str = diff --git a/src/terminal_adm3a.rs b/src/terminal_adm3a.rs index 91f97f6..e1e9383 100644 --- a/src/terminal_adm3a.rs +++ b/src/terminal_adm3a.rs @@ -1,4 +1,4 @@ -use super::terminal::TerminalEmulator; +use crate::terminal::TerminalEmulator; /* See: