summaryrefslogtreecommitdiffstats
path: root/rust/src/api_server.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-11 09:39:21 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-11 09:39:21 -0700
commit98f21fe69e0361db00e5fbceb7a3168dcb926d32 (patch)
tree997e318b24f52ccbacbdfb149a203e4e3bac486f /rust/src/api_server.rs
parentb15fa552e288bec5bbc2b07a3e11bab9235a1e7c (diff)
downloadfatcat-98f21fe69e0361db00e5fbceb7a3168dcb926d32.tar.gz
fatcat-98f21fe69e0361db00e5fbceb7a3168dcb926d32.zip
rust clippy (lint) tweaks
Diffstat (limited to 'rust/src/api_server.rs')
-rw-r--r--rust/src/api_server.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index 076bc085..449196be 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -61,7 +61,7 @@ impl Server {
pub fn get_container_handler(
&self,
id: FatCatId,
- _expand: Option<String>,
+ _expand: &Option<String>,
conn: &DbConn,
) -> Result<ContainerEntity> {
ContainerEntity::db_get(conn, id)
@@ -85,7 +85,7 @@ impl Server {
pub fn get_creator_handler(
&self,
id: FatCatId,
- _expand: Option<String>,
+ _expand: &Option<String>,
conn: &DbConn,
) -> Result<CreatorEntity> {
CreatorEntity::db_get(conn, id)
@@ -129,7 +129,7 @@ impl Server {
pub fn get_file_handler(
&self,
id: FatCatId,
- _expand: Option<String>,
+ _expand: &Option<String>,
conn: &DbConn,
) -> Result<FileEntity> {
FileEntity::db_get(conn, id)
@@ -152,7 +152,7 @@ impl Server {
pub fn get_release_handler(
&self,
id: FatCatId,
- expand: Option<String>,
+ expand: &Option<String>,
conn: &DbConn,
) -> Result<ReleaseEntity> {
let mut release = ReleaseEntity::db_get(conn, id)?;
@@ -162,7 +162,7 @@ impl Server {
release.files = Some(self.get_release_files_handler(id, conn)?);
if let Some(ref cid) = release.container_id {
release.container =
- Some(self.get_container_handler(FatCatId::from_str(&cid)?, None, conn)?);
+ Some(self.get_container_handler(FatCatId::from_str(&cid)?, &None, conn)?);
}
}
Ok(release)
@@ -204,7 +204,7 @@ impl Server {
pub fn get_work_handler(
&self,
id: FatCatId,
- _expand: Option<String>,
+ _expand: &Option<String>,
conn: &DbConn,
) -> Result<WorkEntity> {
WorkEntity::db_get(conn, id)