Silence some clippy warnings on generated code and large preformatted data.
This commit is contained in:
parent
ea75e3ed21
commit
e9b495e729
|
@ -1,4 +1,8 @@
|
|||
#![allow(dead_code)]
|
||||
#![allow(clippy::cast_lossless)]
|
||||
#![allow(clippy::excessive_precision)]
|
||||
#![allow(clippy::unreadable_literal)]
|
||||
#![allow(clippy::needless_return)]
|
||||
|
||||
// Include the file generated by the build.rs script
|
||||
include!(concat!(env!("OUT_DIR"), "/halton.rs"));
|
||||
|
|
|
@ -45,7 +45,7 @@ pub fn sample_with_scramble(dimension: u32, mut index: u32, scramble: u32) -> f3
|
|||
i += 1;
|
||||
}
|
||||
|
||||
return result as f32 * (1.0 / (1u64 << 32) as f32);
|
||||
result as f32 * (1.0 / (1u64 << 32) as f32)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
// The tabulated direction numbers are available here:
|
||||
// http://web.maths.unsw.edu.au/~fkuo/sobol/new-joe-kuo-6.21201
|
||||
|
||||
#![allow(clippy::unreadable_literal)]
|
||||
|
||||
pub const NUM_DIMENSIONS: usize = 1024;
|
||||
pub const SIZE: usize = 52;
|
||||
|
||||
|
|
|
@ -779,8 +779,9 @@ def write_output(data_points, grid, grid_res, filename):
|
|||
|
||||
f.write('// This file is auto-generated by generate_spectra_tables.py\n')
|
||||
f.write('#![allow(dead_code)]\n')
|
||||
f.write('#![cfg_attr(rustfmt, rustfmt_skip)]')
|
||||
f.write('\n\n')
|
||||
f.write('#![cfg_attr(rustfmt, rustfmt_skip)]\n')
|
||||
f.write('#![allow(clippy::unreadable_literal)]\n')
|
||||
f.write('\n')
|
||||
f.write('/// This is 1 over the integral over either CMF.\n')
|
||||
f.write('/// Spectra can be mapped so that xyz=(1,1,1) is converted to constant 1 by\n')
|
||||
f.write('/// dividing by this value. This is important for valid reflectances.\n')
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// This file is auto-generated by generate_spectra_tables.py
|
||||
#![allow(dead_code)]
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(clippy::unreadable_literal)]
|
||||
|
||||
/// This is 1 over the integral over either CMF.
|
||||
/// Spectra can be mapped so that xyz=(1,1,1) is converted to constant 1 by
|
||||
|
|
Loading…
Reference in New Issue
Block a user