From 41a607c8c2b32abbd7d39eebdcba496641357252 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Sun, 18 Dec 2022 13:11:35 +1100 Subject: [PATCH] rearrange mod/use --- src/main.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index d29f54b..8dc3754 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,18 +1,14 @@ #![allow(dead_code)] -use std::{fmt::Debug, path::Path, process::Command, sync::Mutex}; - +mod datatypes; +mod mppt_structs; +mod offsets; +use crate::datatypes::*; +use crate::mppt_structs::{MpptEeprom, MpptRam}; +use crate::offsets::{OffsetsEeprom, OffsetsRam}; use clap::{Parser, Subcommand}; use libmodbus_rs::{Modbus, ModbusClient, ModbusRTU}; - -mod offsets; -use crate::offsets::{OffsetsEeprom, OffsetsRam}; - -mod datatypes; -use crate::datatypes::*; - -mod mppt_structs; -use crate::mppt_structs::{MpptEeprom, MpptRam}; +use std::{fmt::Debug, path::Path, process::Command, sync::Mutex}; const DEVICE_ID: u8 = 0x01; const RAM_DATA_SIZE: u16 = 0x005B;