]> Untitled Git - lemmy.git/commitdiff
Run cargo clippy in CI on whole workspace
authorFelix Ableitner <me@nutomic.com>
Tue, 22 Dec 2020 12:03:50 +0000 (13:03 +0100)
committerFelix Ableitner <me@nutomic.com>
Tue, 22 Dec 2020 12:03:50 +0000 (13:03 +0100)
.drone.yml
lemmy_db_views/src/post_view.rs

index 6a2630b53949cfe3ee08d9c56bd9aa03248e4b9e..eb5992234e7c46b6b1747ebfb5c90214dfed2d85 100644 (file)
@@ -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
index 9ce1af72ee52a5517693d438ca80e7f59a688f5c..dcd6a9814c8c9e3e6313e34b3701d73d51b2d799 100644 (file)
@@ -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,