Silence clippy warnings in spectra_xyz sub-crate.

This commit is contained in:
Nathan Vegdahl 2018-12-15 22:22:29 -08:00
parent f9d75f490c
commit 53424b393d
3 changed files with 8 additions and 0 deletions

View File

@ -781,6 +781,7 @@ def write_output(data_points, grid, grid_res, filename):
f.write('#![allow(dead_code)]\n') f.write('#![allow(dead_code)]\n')
f.write('#![cfg_attr(rustfmt, rustfmt_skip)]\n') f.write('#![cfg_attr(rustfmt, rustfmt_skip)]\n')
f.write('#![allow(clippy::unreadable_literal)]\n') f.write('#![allow(clippy::unreadable_literal)]\n')
f.write('#![allow(clippy::excessive_precision)]\n')
f.write('\n') f.write('\n')
f.write('/// This is 1 over the integral over either CMF.\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('/// Spectra can be mapped so that xyz=(1,1,1) is converted to constant 1 by\n')

View File

@ -1,3 +1,9 @@
// Since this is basicallt translated from C, silence a bunch of
// clippy warnings that stem from the C code.
#![allow(clippy::needless_return)]
#![allow(clippy::useless_let_if_seq)]
#![allow(clippy::cyclomatic_complexity)]
extern crate float4; extern crate float4;
use float4::Float4; use float4::Float4;

View File

@ -2,6 +2,7 @@
#![allow(dead_code)] #![allow(dead_code)]
#![cfg_attr(rustfmt, rustfmt_skip)] #![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(clippy::unreadable_literal)] #![allow(clippy::unreadable_literal)]
#![allow(clippy::excessive_precision)]
/// This is 1 over the integral over either CMF. /// 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 /// Spectra can be mapped so that xyz=(1,1,1) is converted to constant 1 by