Use FileIDType::from() and remove select_id_type_from_str()
This commit is contained in:
parent
ce4d99384b
commit
1b0f4894ac
1 changed files with 1 additions and 8 deletions
|
@ -151,7 +151,7 @@ impl<'a> From<&'a String> for FileID {
|
|||
debug!(" Hash Name: {:?}", hashname);
|
||||
debug!(" Hash: {:?}", hash);
|
||||
|
||||
let idtype = select_id_type_from_str(hashname);
|
||||
let idtype = FileIDType::from(hashname);
|
||||
match idtype {
|
||||
FileIDType::NONE => hash = "INVALID",
|
||||
_ => {},
|
||||
|
@ -231,13 +231,6 @@ impl<'a> Display for FileIDError {
|
|||
|
||||
}
|
||||
|
||||
fn select_id_type_from_str(s: &str) -> FileIDType {
|
||||
match s {
|
||||
"UUID" => FileIDType::UUID,
|
||||
_ => FileIDType::NONE,
|
||||
}
|
||||
}
|
||||
|
||||
pub type FileIDResult = Result<FileID, FileIDError>;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Reference in a new issue