diff options
author | Bryan Newbold <bnewbold@archive.org> | 2022-09-07 19:59:14 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2022-09-07 19:59:14 -0700 |
commit | fd61e1aeefdfb6125e0b754d56a39e7700bb7a39 (patch) | |
tree | 19408279f3bf0fbc2b5aac43948736f00671330d /fatcat-cli/src/entities.rs | |
parent | d941d472ada2b5943142751cf2c7e01b66f1d17a (diff) | |
download | fatcat-cli-fd61e1aeefdfb6125e0b754d56a39e7700bb7a39.tar.gz fatcat-cli-fd61e1aeefdfb6125e0b754d56a39e7700bb7a39.zip |
make lint (clippy) cleanups
Diffstat (limited to 'fatcat-cli/src/entities.rs')
-rw-r--r-- | fatcat-cli/src/entities.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fatcat-cli/src/entities.rs b/fatcat-cli/src/entities.rs index a2a571f..7f88a8b 100644 --- a/fatcat-cli/src/entities.rs +++ b/fatcat-cli/src/entities.rs @@ -8,7 +8,7 @@ use std::io::{BufRead, Read}; use std::path::PathBuf; use std::str::FromStr; -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] pub struct Mutation { field: String, value: Option<String>, @@ -99,25 +99,25 @@ pub fn entity_model_from_json_str( ) -> Result<Box<dyn ApiEntityModel>> { match entity_type { EntityType::Release => Ok(Box::new(serde_json::from_str::<models::ReleaseEntity>( - &json_str, + json_str, )?)), EntityType::Work => Ok(Box::new(serde_json::from_str::<models::WorkEntity>( - &json_str, + json_str, )?)), EntityType::Container => Ok(Box::new(serde_json::from_str::<models::ContainerEntity>( - &json_str, + json_str, )?)), EntityType::Creator => Ok(Box::new(serde_json::from_str::<models::CreatorEntity>( - &json_str, + json_str, )?)), EntityType::File => Ok(Box::new(serde_json::from_str::<models::FileEntity>( - &json_str, + json_str, )?)), EntityType::FileSet => Ok(Box::new(serde_json::from_str::<models::FilesetEntity>( - &json_str, + json_str, )?)), EntityType::WebCapture => Ok(Box::new(serde_json::from_str::<models::WebcaptureEntity>( - &json_str, + json_str, )?)), } } |