From 5a16d43fef431c85b17aaf06c9edec460cbde3b2 Mon Sep 17 00:00:00 2001
From: Felix Ableitner <me@nutomic.com>
Date: Tue, 22 Dec 2020 13:03:50 +0100
Subject: [PATCH] Run cargo clippy in CI on whole workspace

---
 .drone.yml                      | 2 +-
 lemmy_db_views/src/post_view.rs | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.drone.yml b/.drone.yml
index 6a2630b5..eb599223 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -17,7 +17,7 @@ steps:
   - name: cargo clippy
     image: ekidd/rust-musl-builder:1.47.0
     commands:
-      - cargo clippy --all-targets --all-features -- -D warnings
+      - cargo clippy --workspace --all-targets --all-features -- -D warnings
 
   - name: check documentation build
     image: ekidd/rust-musl-builder:1.47.0
diff --git a/lemmy_db_views/src/post_view.rs b/lemmy_db_views/src/post_view.rs
index 9ce1af72..dcd6a981 100644
--- a/lemmy_db_views/src/post_view.rs
+++ b/lemmy_db_views/src/post_view.rs
@@ -540,7 +540,7 @@ mod tests {
     let expected_post_listing_no_user = PostView {
       post: Post {
         id: inserted_post.id,
-        name: post_name.to_owned(),
+        name: post_name,
         creator_id: inserted_user.id,
         url: None,
         body: None,
@@ -562,7 +562,7 @@ mod tests {
       my_vote: None,
       creator: UserSafe {
         id: inserted_user.id,
-        name: user_name.to_owned(),
+        name: user_name,
         preferred_username: None,
         published: inserted_user.published,
         avatar: None,
@@ -579,7 +579,7 @@ mod tests {
       creator_banned_from_community: false,
       community: CommunitySafe {
         id: inserted_community.id,
-        name: community_name.to_owned(),
+        name: community_name,
         icon: None,
         removed: false,
         deleted: false,
-- 
2.44.1