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::{
|
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() {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue