mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
clippy: Fix assorted warnings in components/
(#31628)
* clippy: fix assorted warnings in `components/` * fix: new and default * fix: review comments
This commit is contained in:
parent
0fda14263a
commit
03d64d0675
14 changed files with 87 additions and 98 deletions
|
@ -54,6 +54,7 @@ const DEVICE_POLL_INTERVAL: u64 = 100;
|
|||
pub const PRESENTATION_BUFFER_COUNT: usize = 10;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum WebGPUResponse {
|
||||
RequestAdapter {
|
||||
adapter_info: wgt::AdapterInfo,
|
||||
|
@ -330,6 +331,12 @@ impl WebGPU {
|
|||
}
|
||||
}
|
||||
|
||||
type WebGPUBufferMaps<'a> =
|
||||
HashMap<id::BufferId, Rc<BufferMapInfo<'a, Option<WebGPUResponseResult>>>>;
|
||||
type WebGPUPresentBufferMaps<'a> =
|
||||
HashMap<id::BufferId, Rc<BufferMapInfo<'a, (Option<ErrorScopeId>, WebGPURequest)>>>;
|
||||
|
||||
#[allow(clippy::upper_case_acronyms)] // Name of the library
|
||||
struct WGPU<'a> {
|
||||
receiver: IpcReceiver<(Option<ErrorScopeId>, WebGPURequest)>,
|
||||
sender: IpcSender<(Option<ErrorScopeId>, WebGPURequest)>,
|
||||
|
@ -340,10 +347,9 @@ struct WGPU<'a> {
|
|||
// Track invalid adapters https://gpuweb.github.io/gpuweb/#invalid
|
||||
_invalid_adapters: Vec<WebGPUAdapter>,
|
||||
// Buffers with pending mapping
|
||||
buffer_maps: HashMap<id::BufferId, Rc<BufferMapInfo<'a, Option<WebGPUResponseResult>>>>,
|
||||
buffer_maps: WebGPUBufferMaps<'a>,
|
||||
// Presentation Buffers with pending mapping
|
||||
present_buffer_maps:
|
||||
HashMap<id::BufferId, Rc<BufferMapInfo<'a, (Option<ErrorScopeId>, WebGPURequest)>>>,
|
||||
present_buffer_maps: WebGPUPresentBufferMaps<'a>,
|
||||
//TODO: Remove this (https://github.com/gfx-rs/wgpu/issues/867)
|
||||
error_command_encoders: RefCell<HashMap<id::CommandEncoderId, String>>,
|
||||
webrender_api: RenderApi,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue