From 73a169c68f5080457f6981046c0bddc95771147a Mon Sep 17 00:00:00 2001 From: Wataru Otsubo Date: Wed, 24 Jul 2024 12:38:56 +0900 Subject: [PATCH] refactor: clippy - remove unused imports --- src/main.rs | 19 ++++++++----------- src/masterlog.rs | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main.rs b/src/main.rs index 16c9ed8..6f52d61 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,19 +1,17 @@ -use core::{panic, str}; +use core::str; use std::{ - collections::BTreeMap, fmt::Display, fs::File, - io::{BufRead, BufReader}, + io::BufReader, path::{self, PathBuf}, str::FromStr, }; use anyhow::{anyhow, Context, Result}; -use chrono::{DateTime, Local, Utc}; +use chrono::{DateTime, Utc}; use clap::{Parser, Subcommand}; -use log::{debug, error, info, trace, warn}; +use log::{debug, trace, warn}; use masterlog::MasterLogResult; -use regex::Regex; use semver::Version; use serde::{Deserialize, Serialize}; use serde_with::{serde_as, DisplayFromStr}; @@ -87,7 +85,7 @@ impl FromStr for PositionLayer { /// Where PS Board is placed while QAQC. /// TODO: name #[derive(Debug, PartialEq, Eq, Hash, Clone, PartialOrd, Ord)] -struct Position { +pub struct Position { major: PositionLayer, minor: u8, patch: u8, @@ -130,7 +128,7 @@ impl FromStr for Position { /// PSB ID printed on the tape on the board. #[derive(Debug, PartialEq, Clone)] -struct PsbId { +pub struct PsbId { id: u32, } @@ -302,10 +300,9 @@ fn main() -> Result<()> { mod test { use std::str::FromStr; - use chrono::{DateTime, Utc}; - use semver::Version; + use chrono::DateTime; - use crate::{Position, PositionLayer, PsbId}; + use crate::{Position, PositionLayer}; #[test] fn positionlayer_ordering() { diff --git a/src/masterlog.rs b/src/masterlog.rs index 23fd45a..7aab53a 100644 --- a/src/masterlog.rs +++ b/src/masterlog.rs @@ -2,7 +2,7 @@ use std::{collections::BTreeMap, io::BufRead, str::FromStr}; use anyhow::{anyhow, Context, Result}; use chrono::{DateTime, Utc}; -use log::{debug, error, info, trace}; +use log::{debug, info, trace}; use regex::Regex; use semver::Version;