cargo fix

This commit is contained in:
core 2023-11-08 10:16:22 -05:00
parent 9d6ed473b2
commit b06ab21743
Signed by: core
GPG Key ID: FDBF740DADDCEECF
4 changed files with 22 additions and 22 deletions

View File

@ -1,7 +1,7 @@
use crate::loadar2;
use crate::mode::Mode;
use crate::scope::ScopeState;
use web_sys::FileReader;
pub fn should_newline(state: &mut ScopeState) -> bool {
state.command_buf.starts_with("MODE SET") || state.command_buf.starts_with("ELEVATION SET")

View File

@ -8,22 +8,22 @@ pub mod utils;
pub mod vcp;
pub mod rendering;
use crate::command::{exec, should_newline};
use crate::mode::Mode;
use crate::mode::Mode::Reflectivity;
use crate::scope::{Preferences, ScopeState, WgpuState};
use js_sys::Uint8Array;
use log::{debug, error, info};
use std::io::Cursor;
use std::ops::{Deref, DerefMut};
use wasm_bindgen::prelude::*;
use web_sys::{CanvasRenderingContext2d, HtmlCanvasElement};
use wgpu::SurfaceError;
use winit::dpi::PhysicalSize;
use winit::event::WindowEvent::KeyboardInput;
use winit::event::{ElementState, Event, WindowEvent};
use winit::event_loop::{EventLoop, EventLoopBuilder, EventLoopProxy, EventLoopWindowTarget};
use winit::keyboard::KeyCode;
use winit::event::{Event, WindowEvent};
use winit::event_loop::{EventLoopBuilder, EventLoopProxy, EventLoopWindowTarget};
use winit::platform::web::{EventLoopExtWebSys, WindowBuilderExtWebSys, WindowExtWebSys};
use winit::window::WindowBuilder;
@ -73,7 +73,7 @@ pub async fn __nxrd_browser_init(w: u32, h: u32) -> AbiProxy {
canvas.set_width(w);
canvas.set_height(h);
let mut render_state = WgpuState::new(window, PhysicalSize::new(w, h)).await;
let render_state = WgpuState::new(window, PhysicalSize::new(w, h)).await;
info!("initializing the scope");
@ -121,7 +121,7 @@ pub async fn __nxrd_browser_init(w: u32, h: u32) -> AbiProxy {
},
Event::WindowEvent {
ref event,
window_id,
window_id: _,
} => match event {
KeyboardInput { event, .. } => {
debug!("{:?}", event.physical_key);

View File

@ -1,12 +1,12 @@
use crate::mode::Mode;
use nexrad2::Nexrad2Chunk;
use raw_window_handle::HasRawDisplayHandle;
use std::collections::HashMap;
use std::iter;
use std::mem::size_of;
use std::sync::Arc;
use web_sys::{CanvasRenderingContext2d, HtmlCanvasElement, HtmlInputElement};
use wgpu::{BlendState, BufferAddress, ColorTargetState, ColorWrites, DeviceDescriptor, Face, FragmentState, FrontFace, PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor, ShaderModuleDescriptor, ShaderSource, VertexAttribute, VertexBufferLayout, VertexFormat, VertexState, VertexStepMode};
use web_sys::{HtmlInputElement};
use wgpu::{BlendState, ColorTargetState, ColorWrites, DeviceDescriptor, Face, FragmentState, FrontFace, PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology, RenderPipeline, RenderPipelineDescriptor, ShaderModuleDescriptor, ShaderSource, VertexState};
use wgpu::{
Backends, Color, CommandEncoderDescriptor, Device, Features, Instance, InstanceDescriptor,
Limits, LoadOp, MultisampleState, Operations, Queue, RenderPassColorAttachment,
@ -17,7 +17,7 @@ use wgpu::util::DeviceExt;
use winit::dpi::PhysicalSize;
use winit::event::WindowEvent;
use winit::window::Window;
use crate::rendering::vertex::{Vector3, Vertex, VERTICES};
use crate::rendering::vertex::{VERTICES};
pub struct ScopeState {
pub ar2: Option<Nexrad2Chunk>,
@ -176,7 +176,7 @@ impl WgpuState {
}
}
pub fn input(&mut self, event: &WindowEvent) -> bool {
pub fn input(&mut self, _event: &WindowEvent) -> bool {
false
}
@ -193,8 +193,8 @@ impl WgpuState {
label: Some("Render Encoder"),
});
let physical_width = (self.surface_config.width as f64 * self.window.scale_factor()) as f32;
let physical_height =
let _physical_width = (self.surface_config.width as f64 * self.window.scale_factor()) as f32;
let _physical_height =
(self.surface_config.height as f64 * self.window.scale_factor()) as f32;
// LOCK BLOCK

View File

@ -1,4 +1,4 @@
use std::cell::OnceCell;
use std::collections::HashMap;
pub struct Site {