Description
Clippy will probably get mad.
TODO
- [X] Incorporate Clippy
- [X] Too Many Arguments problems
- [X] Non Send Fields in Send Type problem
- [X] Type Complexity Problems
- [X] Remove commented references to Clippy in code
Problems
- panel.rs
add_panel_to_world
(10/7)
--> hotham/src/components/panel.rs:79:1
|
79 | / pub fn add_panel_to_world(
80 | | text: &str,
81 | | width: u32,
82 | | height: u32,
... |
89 | | world: &mut World,
90 | | ) -> Entity {
| |___________^
|
- gltf_loader.rs
load_node
(8/7)
--> hotham/src/gltf_loader.rs:88:1
|
88 | / fn load_node(
89 | | node_data: &gltf::Node,
90 | | gltf_buffer: &[u8],
91 | | vulkan_context: &VulkanContext,
... |
96 | | images: &[gltf::image::Data],
97 | | ) -> Result<()> {
| |_______________^
|
- image.rs
new
(8/7)
warning: this function has too many arguments (8/7)
--> hotham/src/image.rs:17:5
|
17 | / pub fn new(
18 | | handle: vk::Image,
19 | | view: vk::ImageView,
20 | | device_memory: vk::DeviceMemory,
... |
25 | | layer_count: u32,
26 | | ) -> Self {
| |_____________^
|
- vulkan_context.rs
create_texture_image
(9/7)
--> hotham/src/resources/vulkan_context.rs:467:5
|
467 | / pub fn create_texture_image(
468 | | &self,
469 | | name: &str,
470 | | image_buf: &[u8], // Clippy &Vec<u8>, ptr_arg for texture.rs
... |
476 | | offsets: Vec<vk::DeviceSize>,
477 | | ) -> Result<(Image, vk::Sampler)> {
| |_____________________________________^
|
- vulkan_context.rs
create_textures_descriptor_sets
(8/7)
--> hotham/src/resources/vulkan_context.rs:802:5
|
802 | / pub fn create_textures_descriptor_sets(
803 | | &self,
804 | | set_layout: vk::DescriptorSetLayout,
805 | | material_name: &str,
... |
810 | | emissive_map: &Texture,
811 | | ) -> VkResult<Vec<vk::DescriptorSet>> {
| |_________________________________________^
warning: very complex type used. Consider factoring parts into type
definitions
- texture.rs
--> hotham/src/texture.rs:183:6
|
183 | ) -> Result<(Vec<u8>, u32, u32, vk::Format, u32, u32, Vec<vk::DeviceSize>)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- vertex.rs
--> hotham/src/vertex.rs:35:12
|
35 | t: (
| ____________^
36 | | Vector3<f32>,
37 | | Vector3<f32>,
38 | | Vector2<f32>,
... |
41 | | Vector4<f32>,
42 | | ),
| |_________^
|
- mod.rs
--> examples/crab-saber/src/systems/mod.rs:15:9
|
15 | PreparedQuery<With<Visible, With<Cube, (&'a Colour, &'a RigidBody, &'a Collider)>>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- audio_context.rs
impl Send for AudioContext
warning: this implementation is unsound, as some fields in `AudioContext` are `!Send`
--> hotham/src/resources/audio_context.rs:97:1
|
97 | unsafe impl Send for AudioContext {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::non_send_fields_in_send_ty)]` on by default
note: the type of field `stream` is `!Send`
--> hotham/src/resources/audio_context.rs:22:5
|
22 | pub stream: Arc<Mutex<Stream>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use a thread-safe type that implements `Send`
cleanup maintenance