From 6ac3a44e883a5dc1fcde15ab331d0e8fea27efb1 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 4 Feb 2022 08:57:39 -0700 Subject: [PATCH 1/2] Cause tests to fail on CI when there are warnings Co-Authored-By: Antonio Scandurra --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd92792714e338f74c66a4cec7822686644bac89..cfaf778375770be20b16deabdc52e44694892f1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: tests: name: Run tests runs-on: self-hosted + env: + RUSTFLAGS: -D warnings steps: - name: Install Rust uses: actions-rs/toolchain@v1 From 4eb2b978e87b819e708f5cd8f506e03cfb0bf4ac Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 4 Feb 2022 09:23:16 -0700 Subject: [PATCH 2/2] Fix warning when not building in test mode Co-Authored-By: Antonio Scandurra --- crates/project/src/fs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/project/src/fs.rs b/crates/project/src/fs.rs index 994f60fb1fcc29703c28536eb38e444e91aec04e..8ef076abc33ce5db6172356718cf8a81b9e3ab1f 100644 --- a/crates/project/src/fs.rs +++ b/crates/project/src/fs.rs @@ -1,7 +1,6 @@ use anyhow::{anyhow, Result}; use fsevent::EventStream; use futures::{Stream, StreamExt}; -use postage::prelude::Sink as _; use smol::io::{AsyncReadExt, AsyncWriteExt}; use std::{ io, @@ -164,6 +163,8 @@ impl FakeFsState { } async fn emit_event(&mut self, paths: &[&Path]) { + use postage::prelude::Sink as _; + let events = paths .iter() .map(|path| fsevent::Event {