mirror of
https://gitlab.cern.ch/wotsubo/psboard-qaqc-postprocess.git
synced 2024-11-24 08:01:11 +09:00
refactor: clippy
- remove unused imports
This commit is contained in:
parent
bca7c3430d
commit
73a169c68f
2 changed files with 9 additions and 12 deletions
19
src/main.rs
19
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() {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue