Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PikminGuts92 committed Jan 20, 2024
1 parent 98ba3d7 commit 604fe0a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ thiserror = "1.0.56"
[workspace.lints.rust]
dead_code = "allow"
deprecated = "allow"
unused_assignments = "allow"
unused_imports = "allow"

[profile.dev.package."*"]
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/audio_tool/src/apps/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pub struct EncoderApp {

impl SubApp for EncoderApp {
fn process(&mut self) -> Result<(), Box<dyn Error>> {
let input_path = Path::new(&self.input_path);
let output_path = Path::new(&self.output_path);
let _input_path = Path::new(&self.input_path);
let _output_path = Path::new(&self.output_path);

todo!()
//Ok(())
Expand Down
2 changes: 1 addition & 1 deletion core/grim/src/audio/xma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn read_frame_length<R: Read, E: Endianness>(reader: &mut BitReader<R, E>) -
}

#[cfg(feature = "audio_experimental")]
pub fn decode_xma_packets(packets: &[u8], sample_count: i32) -> Result<Vec<i16>> {
pub fn decode_xma_packets(packets: &[u8], _sample_count: i32) -> Result<Vec<i16>> {
let mut reader = BitReader::endian(Cursor::new(packets), BigEndian);

let packet = PacketInfo::from_reader(&mut reader)?;
Expand Down
2 changes: 1 addition & 1 deletion core/grim/src/dta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl DataArray {
stream.write_all(&v.data)?;
},
//DataArray::Func(_) => 0x03,
DataArray::Object(o) => {
DataArray::Object(_o) => {
todo!("Support object dta serialization")
},
DataArray::Symbol(s) => {
Expand Down
4 changes: 2 additions & 2 deletions core/grim/src/dta/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<'a> DTAParser<'a> {
}

fn parse_array(&mut self) -> Vec<(DataArray, usize)> {
let mut data = Vec::new();
let data = Vec::new();

self.consume_whitespace();
// TODO: Consume comments
Expand Down Expand Up @@ -346,7 +346,7 @@ fn parse_variable<'a>(text: &'a [u8]) -> IResult<&'a [u8], DataArray> {
fn parse_kdata_unhandled<'a>(text: &'a [u8]) -> IResult<&'a [u8], DataArray> {
map(
all_consuming(tag("kDataUnhandled")),
|data: &'a [u8]| DataArray::KDataUnhandled
|_data: &'a [u8]| DataArray::KDataUnhandled
)(text)
}

Expand Down
8 changes: 4 additions & 4 deletions core/grim/src/model/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ impl GltfExporter {

self.dirs_rc.clear();

for (i, mut dir_entry) in self.object_dirs.drain(..).enumerate() {
for (_i, mut dir_entry) in self.object_dirs.drain(..).enumerate() {
let entries = dir_entry.entries.drain(..).collect::<Vec<_>>();
let parent = Rc::new(dir_entry);

Expand Down Expand Up @@ -1849,7 +1849,7 @@ impl GltfExporter {
let mut samplers = Vec::new();

// TODO: Delete after testing
let filtered_bone_names = HashSet::from([
let _filtered_bone_names = HashSet::from([
//"bone_neck.mesh"
"bone_spine1.mesh",
"bone_spine2.mesh",
Expand All @@ -1865,7 +1865,7 @@ impl GltfExporter {
//.filter(|(b, _)| filtered_bone_names.contains(b.symbol.as_str()))
.collect::<Vec<_>>();

for (mut bone, frames) in bone_samples {
for (mut bone, _frames) in bone_samples {
let bone_name = bone.symbol.as_str();
let Some(node_idx) = node_map.get(bone_name).map(|i| *i) else {
continue;
Expand All @@ -1887,7 +1887,7 @@ impl GltfExporter {
.unwrap_or_else(|| na::UnitQuaternion::identity());

// TODO: Add scaling transform samples...
let node_scale = node.scale
let _node_scale = node.scale
.map(na::Vector3::from)
.unwrap_or_else(|| na::Vector3::from_element(1.0));

Expand Down
2 changes: 1 addition & 1 deletion core/grim/src/scene/object_dir.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{SystemInfo};
use crate::SystemInfo;
use crate::io::{BinaryStream, FileSearchDepth, FileStream, MemoryStream, PathFinder, SeekFrom, Stream};
use crate::scene::*;
use lazy_static::lazy_static;
Expand Down
4 changes: 2 additions & 2 deletions utils/anim_preview/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use rerun::{
components::{LineStrip3D, Position3D, Radius, Scalar, Transform3D, ViewCoordinates},
RecordingStream, RecordingStreamBuilder,
time::Timeline,
transform::{TranslationRotationScale3D},
transform::TranslationRotationScale3D,
};
use rerun::{Arrows3D, Points3D};

Expand Down Expand Up @@ -419,7 +419,7 @@ impl<'a> BoneNode<'a> {
}

if let Some(rotz) = rotz {
let (roll, pitch, yaw) = rotate.euler_angles();
let (_roll, _pitch, _yaw) = rotate.euler_angles();
//println!("({}, {}, {})", roll, pitch, yaw);

//rotate = na::UnitQuaternion::from_euler_angles(roll, pitch, std::f32::consts::PI * rotz);
Expand Down

0 comments on commit 604fe0a

Please sign in to comment.