Quiet warnings

Fixes the warnings remaining in the code, which should in turn let us check that in CI.

Also checks the optional features, which are easy enough to break.
This commit is contained in:
Raph Levien 2023-05-18 15:36:06 -07:00
parent abfe9fbb56
commit 1f6b47bd78
4 changed files with 7 additions and 3 deletions

View file

@ -21,6 +21,7 @@ jobs:
- name: Install native dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- run: cargo check --workspace
- run: cargo check --features=hot_reload,buffer_labels
# --exclude with_bevy # for when bevy has an outdated wgpu version
# -Dwarnings # for when we have fixed unused code warnings

View file

@ -63,6 +63,7 @@ pub struct BufProxy {
#[derive(Copy, Clone, PartialEq, Eq)]
pub enum ImageFormat {
Rgba8,
#[allow(unused)]
Bgra8,
}
@ -81,6 +82,7 @@ pub enum ResourceProxy {
}
pub enum ExternalResource<'a> {
#[allow(unused)]
Buf(BufProxy, &'a Buffer),
Image(ImageProxy, &'a TextureView),
}
@ -800,7 +802,7 @@ impl ResourcePool {
fn get_buf(
&mut self,
size: u64,
name: &'static str,
#[allow(unused)] name: &'static str,
usage: BufferUsages,
device: &Device,
) -> Buffer {

View file

@ -2,7 +2,7 @@
use crate::{
engine::{BufProxy, ImageFormat, ImageProxy, Recording, ResourceProxy},
shaders::{self, FullShaders},
shaders::FullShaders,
RenderParams, Scene,
};
use vello_encoding::{Encoding, WorkgroupSize};

View file

@ -5,6 +5,7 @@ use std::{
vec,
};
#[allow(unused)]
pub fn get_imports(shader_dir: &Path) -> HashMap<String, String> {
let mut imports = HashMap::new();
let imports_dir = shader_dir.join("shared");