refactor: clippy

- remove unused imports
This commit is contained in:
Wataru Otsubo 2024-07-24 12:38:56 +09:00
parent bca7c3430d
commit 73a169c68f
2 changed files with 9 additions and 12 deletions

View file

@ -1,19 +1,17 @@
use core::{panic, str}; use core::str;
use std::{ use std::{
collections::BTreeMap,
fmt::Display, fmt::Display,
fs::File, fs::File,
io::{BufRead, BufReader}, io::BufReader,
path::{self, PathBuf}, path::{self, PathBuf},
str::FromStr, str::FromStr,
}; };
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use chrono::{DateTime, Local, Utc}; use chrono::{DateTime, Utc};
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use log::{debug, error, info, trace, warn}; use log::{debug, trace, warn};
use masterlog::MasterLogResult; use masterlog::MasterLogResult;
use regex::Regex;
use semver::Version; use semver::Version;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_with::{serde_as, DisplayFromStr}; use serde_with::{serde_as, DisplayFromStr};
@ -87,7 +85,7 @@ impl FromStr for PositionLayer {
/// Where PS Board is placed while QAQC. /// Where PS Board is placed while QAQC.
/// TODO: name /// TODO: name
#[derive(Debug, PartialEq, Eq, Hash, Clone, PartialOrd, Ord)] #[derive(Debug, PartialEq, Eq, Hash, Clone, PartialOrd, Ord)]
struct Position { pub struct Position {
major: PositionLayer, major: PositionLayer,
minor: u8, minor: u8,
patch: u8, patch: u8,
@ -130,7 +128,7 @@ impl FromStr for Position {
/// PSB ID printed on the tape on the board. /// PSB ID printed on the tape on the board.
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, PartialEq, Clone)]
struct PsbId { pub struct PsbId {
id: u32, id: u32,
} }
@ -302,10 +300,9 @@ fn main() -> Result<()> {
mod test { mod test {
use std::str::FromStr; use std::str::FromStr;
use chrono::{DateTime, Utc}; use chrono::DateTime;
use semver::Version;
use crate::{Position, PositionLayer, PsbId}; use crate::{Position, PositionLayer};
#[test] #[test]
fn positionlayer_ordering() { fn positionlayer_ordering() {

View file

@ -2,7 +2,7 @@ use std::{collections::BTreeMap, io::BufRead, str::FromStr};
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use log::{debug, error, info, trace}; use log::{debug, info, trace};
use regex::Regex; use regex::Regex;
use semver::Version; use semver::Version;