refactor: pedantic cargo clippy, do not use Results for always-succeeding functions
This commit is contained in:
@@ -124,7 +124,7 @@ impl WCommandBuffer<CmdBufXfer> {
|
||||
|
||||
pub fn update_image(
|
||||
&mut self,
|
||||
image: Arc<Image>,
|
||||
image: &Arc<Image>,
|
||||
data: &[u8],
|
||||
offset: [u32; 3],
|
||||
extent: Option<[u32; 3]>,
|
||||
@@ -156,9 +156,9 @@ impl WCommandBuffer<CmdBufXfer> {
|
||||
|
||||
pub fn copy_image(
|
||||
&mut self,
|
||||
src: Arc<Image>,
|
||||
src: &Arc<Image>,
|
||||
src_offset: [u32; 3],
|
||||
dst: Arc<Image>,
|
||||
dst: &Arc<Image>,
|
||||
dst_offset: [u32; 3],
|
||||
extent: Option<[u32; 3]>,
|
||||
) -> anyhow::Result<()> {
|
||||
|
||||
@@ -181,8 +181,8 @@ impl WGfx {
|
||||
|
||||
pub fn create_pipeline<V>(
|
||||
self: &Arc<Self>,
|
||||
vert: Arc<ShaderModule>,
|
||||
frag: Arc<ShaderModule>,
|
||||
vert: &Arc<ShaderModule>,
|
||||
frag: &Arc<ShaderModule>,
|
||||
format: Format,
|
||||
blend: Option<AttachmentBlend>,
|
||||
topology: PrimitiveTopology,
|
||||
|
||||
@@ -32,7 +32,7 @@ where
|
||||
V: BufferContents + Vertex,
|
||||
{
|
||||
pub(super) fn new(
|
||||
pipeline: Arc<WGfxPipeline<V>>,
|
||||
pipeline: &Arc<WGfxPipeline<V>>,
|
||||
dimensions: [f32; 2],
|
||||
vertex_buffer: Subbuffer<[V]>,
|
||||
vertices: Range<u32>,
|
||||
|
||||
@@ -105,6 +105,7 @@ where
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
pub fn inner(&self) -> Arc<GraphicsPipeline> {
|
||||
self.pipeline.clone()
|
||||
}
|
||||
@@ -149,6 +150,7 @@ where
|
||||
)?)
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn uniform_buffer_upload<T>(
|
||||
&self,
|
||||
set: usize,
|
||||
@@ -183,8 +185,8 @@ where
|
||||
{
|
||||
pub(super) fn new_with_vert_input(
|
||||
graphics: Arc<WGfx>,
|
||||
vert: Arc<ShaderModule>,
|
||||
frag: Arc<ShaderModule>,
|
||||
vert: &Arc<ShaderModule>,
|
||||
frag: &Arc<ShaderModule>,
|
||||
format: Format,
|
||||
blend: Option<AttachmentBlend>,
|
||||
topology: PrimitiveTopology,
|
||||
@@ -199,7 +201,7 @@ where
|
||||
V::per_vertex().definition(&vert_entry_point)?
|
||||
});
|
||||
|
||||
WGfxPipeline::new_from_stages(
|
||||
Self::new_from_stages(
|
||||
graphics,
|
||||
format,
|
||||
blend,
|
||||
@@ -219,7 +221,7 @@ where
|
||||
descriptor_sets: Vec<Arc<DescriptorSet>>,
|
||||
) -> anyhow::Result<WGfxPass<V>> {
|
||||
WGfxPass::new(
|
||||
self.clone(),
|
||||
&self.clone(),
|
||||
dimensions,
|
||||
vertex_buffer,
|
||||
vertices,
|
||||
|
||||
Reference in New Issue
Block a user