[INFO] crate fang_oost_option 0.27.0 is already in cache [INFO] extracting crate fang_oost_option 0.27.0 into work/ex/clippy-test-run/sources/stable/reg/fang_oost_option/0.27.0 [INFO] extracting crate fang_oost_option 0.27.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/fang_oost_option/0.27.0 [INFO] validating manifest of fang_oost_option-0.27.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of fang_oost_option-0.27.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing fang_oost_option-0.27.0 [INFO] finished frobbing fang_oost_option-0.27.0 [INFO] frobbed toml for fang_oost_option-0.27.0 written to work/ex/clippy-test-run/sources/stable/reg/fang_oost_option/0.27.0/Cargo.toml [INFO] started frobbing fang_oost_option-0.27.0 [INFO] finished frobbing fang_oost_option-0.27.0 [INFO] frobbed toml for fang_oost_option-0.27.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/fang_oost_option/0.27.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting fang_oost_option-0.27.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/fang_oost_option/0.27.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 8fc4b4557052b3584fafedc16fe546a6aabe6fae4f296bc020324d341e1cb5e7 [INFO] running `"docker" "start" "-a" "8fc4b4557052b3584fafedc16fe546a6aabe6fae4f296bc020324d341e1cb5e7"` [INFO] [stderr] Checking approx v0.2.1 [INFO] [stderr] Checking cf_functions v0.6.2 [INFO] [stderr] Checking num-rational v0.2.1 [INFO] [stderr] Checking nrfind v1.0.2 [INFO] [stderr] Checking num v0.2.0 [INFO] [stderr] Checking black_scholes v0.2.8 [INFO] [stderr] Checking fang_oost v0.13.8 [INFO] [stderr] Checking fang_oost_option v0.27.0 (/opt/crater/workdir) [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/option_pricing.rs:41:38 [INFO] [stderr] | [INFO] [stderr] 41 | fn phi_k(a:f64, c:f64, d:f64, u:f64, k:usize)->f64{ [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/option_pricing.rs:41:38 [INFO] [stderr] | [INFO] [stderr] 41 | fn phi_k(a:f64, c:f64, d:f64, u:f64, k:usize)->f64{ [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: unused `#[macro_use]` import [INFO] [stderr] --> src/lib.rs:5:1 [INFO] [stderr] | [INFO] [stderr] 5 | #[macro_use] [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/option_pricing.rs:102:5 [INFO] [stderr] | [INFO] [stderr] 102 | results [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/option_pricing.rs:93:17 [INFO] [stderr] | [INFO] [stderr] 93 | let results=fang_oost::get_expectation_extended( [INFO] [stderr] | _________________^ [INFO] [stderr] 94 | | x_min, [INFO] [stderr] 95 | | x_max, [INFO] [stderr] 96 | | get_x_from_k_iterator(asset, strikes), [INFO] [stderr] ... | [INFO] [stderr] 100 | | m_output(result, index) [INFO] [stderr] 101 | | }).collect(); [INFO] [stderr] | |________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/monotone_spline.rs:2:40 [INFO] [stderr] | [INFO] [stderr] 2 | const LARGEST_APPROPRIATE_DISTANCE:f64=0.00000000001; [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider: `0.000_000_000_01` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/option_calibration.rs:44:10 [INFO] [stderr] | [INFO] [stderr] 44 | else { [INFO] [stderr] | __________^ [INFO] [stderr] 45 | | if index % 2 == 0 { [INFO] [stderr] 46 | | 2.0 [INFO] [stderr] 47 | | } [INFO] [stderr] ... | [INFO] [stderr] 50 | | } [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 44 | else if index % 2 == 0 { [INFO] [stderr] 45 | 2.0 [INFO] [stderr] 46 | } [INFO] [stderr] 47 | else { [INFO] [stderr] 48 | 4.0 [INFO] [stderr] 49 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_calibration.rs:193:20 [INFO] [stderr] | [INFO] [stderr] 193 | let max_option=0.00000001; //essentially zero [INFO] [stderr] | ^^^^^^^^^^ help: consider: `0.000_000_01` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_calibration.rs:313:24 [INFO] [stderr] | [INFO] [stderr] 313 | const LARGE_NUMBER:f64=500000.0; [INFO] [stderr] | ^^^^^^^^ help: consider: `500_000.0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:129:1 [INFO] [stderr] | [INFO] [stderr] 129 | / pub fn fang_oost_call_price<'a, S>( [INFO] [stderr] 130 | | num_u:usize, [INFO] [stderr] 131 | | asset:f64, [INFO] [stderr] 132 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 147 | | ) [INFO] [stderr] 148 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:175:1 [INFO] [stderr] | [INFO] [stderr] 175 | / pub fn fang_oost_put_price<'a, S>( [INFO] [stderr] 176 | | num_u:usize, [INFO] [stderr] 177 | | asset:f64, [INFO] [stderr] 178 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 193 | | ) [INFO] [stderr] 194 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:220:1 [INFO] [stderr] | [INFO] [stderr] 220 | / pub fn fang_oost_call_delta<'a, S>( [INFO] [stderr] 221 | | num_u:usize, [INFO] [stderr] 222 | | asset:f64, [INFO] [stderr] 223 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 238 | | ) [INFO] [stderr] 239 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:265:1 [INFO] [stderr] | [INFO] [stderr] 265 | / pub fn fang_oost_put_delta<'a, S>( [INFO] [stderr] 266 | | num_u:usize, [INFO] [stderr] 267 | | asset:f64, [INFO] [stderr] 268 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 283 | | ) [INFO] [stderr] 284 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:317:1 [INFO] [stderr] | [INFO] [stderr] 317 | / pub fn fang_oost_call_theta<'a, S>( [INFO] [stderr] 318 | | num_u:usize, [INFO] [stderr] 319 | | asset:f64, [INFO] [stderr] 320 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 335 | | ) [INFO] [stderr] 336 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:369:1 [INFO] [stderr] | [INFO] [stderr] 369 | / pub fn fang_oost_put_theta<'a, S>( [INFO] [stderr] 370 | | num_u:usize, [INFO] [stderr] 371 | | asset:f64, [INFO] [stderr] 372 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 387 | | ) [INFO] [stderr] 388 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:415:1 [INFO] [stderr] | [INFO] [stderr] 415 | / pub fn fang_oost_call_gamma<'a, S>( [INFO] [stderr] 416 | | num_u:usize, [INFO] [stderr] 417 | | asset:f64, [INFO] [stderr] 418 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 433 | | ) [INFO] [stderr] 434 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:467:1 [INFO] [stderr] | [INFO] [stderr] 467 | / pub fn fang_oost_put_gamma<'a, S>( [INFO] [stderr] 468 | | num_u:usize, [INFO] [stderr] 469 | | asset:f64, [INFO] [stderr] 470 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 477 | | fang_oost_call_gamma(num_u, asset, &strikes, rate, t_maturity, cf) [INFO] [stderr] 478 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/monotone_spline.rs:62:12 [INFO] [stderr] | [INFO] [stderr] 62 | }).expect(&format!("Requires x to be between the bounds! x is currently {}, lower bound is {}, upper bound is {}", x, first_x_and_y.0, last_x_and_y.0)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Requires x to be between the bounds! x is currently {}, lower bound is {}, upper bound is {}", x))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/option_calibration.rs:200:27 [INFO] [stderr] | [INFO] [stderr] 200 | let (left, mut right):( [INFO] [stderr] | ___________________________^ [INFO] [stderr] 201 | | Vec<(f64, f64)>, [INFO] [stderr] 202 | | Vec<(f64, f64)> [INFO] [stderr] 203 | | )=padded_strikes_and_option_prices [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/option_calibration.rs:209:21 [INFO] [stderr] | [INFO] [stderr] 209 | let threshold_t=left.first().unwrap().clone();//clone so I can push into right [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*left.first().unwrap()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this function has too many arguments (8/7) [INFO] [stderr] --> src/option_calibration.rs:280:1 [INFO] [stderr] | [INFO] [stderr] 280 | / pub fn generate_fo_estimate<'a, 'b:'a>( [INFO] [stderr] 281 | | strikes_and_option_prices:&'b [OptionStats], [INFO] [stderr] 282 | | u_array:&'b [f64], [INFO] [stderr] 283 | | n:usize, [INFO] [stderr] ... | [INFO] [stderr] 311 | | }) [INFO] [stderr] 312 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::too_many_arguments)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stderr] [INFO] [stderr] warning: this lifetime isn't used in the function definition [INFO] [stderr] --> src/option_calibration.rs:355:19 [INFO] [stderr] | [INFO] [stderr] 355 | pub fn obj_fn_arr<'a>( [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::extra_unused_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] warning: unused `#[macro_use]` import [INFO] [stderr] --> src/lib.rs:5:1 [INFO] [stderr] | [INFO] [stderr] 5 | #[macro_use] [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/option_pricing.rs:102:5 [INFO] [stderr] | [INFO] [stderr] 102 | results [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/option_pricing.rs:93:17 [INFO] [stderr] | [INFO] [stderr] 93 | let results=fang_oost::get_expectation_extended( [INFO] [stderr] | _________________^ [INFO] [stderr] 94 | | x_min, [INFO] [stderr] 95 | | x_max, [INFO] [stderr] 96 | | get_x_from_k_iterator(asset, strikes), [INFO] [stderr] ... | [INFO] [stderr] 100 | | m_output(result, index) [INFO] [stderr] 101 | | }).collect(); [INFO] [stderr] | |________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_pricing.rs:752:29 [INFO] [stderr] | [INFO] [stderr] 752 | let reference_price=16.212478;//https://cs.uwaterloo.ca/~paforsyt/levy.pdf pg 19 [INFO] [stderr] | ^^^^^^^^^ help: consider: `16.212_478` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_pricing.rs:778:29 [INFO] [stderr] | [INFO] [stderr] 778 | let reference_price=19.812948843; [INFO] [stderr] | ^^^^^^^^^^^^ help: consider: `19.812_948_843` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_pricing.rs:821:29 [INFO] [stderr] | [INFO] [stderr] 821 | let reference_price=5.78515545; [INFO] [stderr] | ^^^^^^^^^^ help: consider: `5.785_155_45` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/monotone_spline.rs:2:40 [INFO] [stderr] | [INFO] [stderr] 2 | const LARGEST_APPROPRIATE_DISTANCE:f64=0.00000000001; [INFO] [stderr] | ^^^^^^^^^^^^^ help: consider: `0.000_000_000_01` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/monotone_spline.rs:86:25 [INFO] [stderr] | [INFO] [stderr] 86 | epsilon=0.000000001 [INFO] [stderr] | ^^^^^^^^^^^ help: consider: `0.000_000_001` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/option_calibration.rs:44:10 [INFO] [stderr] | [INFO] [stderr] 44 | else { [INFO] [stderr] | __________^ [INFO] [stderr] 45 | | if index % 2 == 0 { [INFO] [stderr] 46 | | 2.0 [INFO] [stderr] 47 | | } [INFO] [stderr] ... | [INFO] [stderr] 50 | | } [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 44 | else if index % 2 == 0 { [INFO] [stderr] 45 | 2.0 [INFO] [stderr] 46 | } [INFO] [stderr] 47 | else { [INFO] [stderr] 48 | 4.0 [INFO] [stderr] 49 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_calibration.rs:193:20 [INFO] [stderr] | [INFO] [stderr] 193 | let max_option=0.00000001; //essentially zero [INFO] [stderr] | ^^^^^^^^^^ help: consider: `0.000_000_01` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_calibration.rs:313:24 [INFO] [stderr] | [INFO] [stderr] 313 | const LARGE_NUMBER:f64=500000.0; [INFO] [stderr] | ^^^^^^^^ help: consider: `500_000.0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/option_calibration.rs:475:113 [INFO] [stderr] | [INFO] [stderr] 475 | assert_abs_diff_eq!(sp_result, price/asset-max_zero_or_number(1.0-(strike/asset)*discount), epsilon=0.0000001); [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.000_000_1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:129:1 [INFO] [stderr] | [INFO] [stderr] 129 | / pub fn fang_oost_call_price<'a, S>( [INFO] [stderr] 130 | | num_u:usize, [INFO] [stderr] 131 | | asset:f64, [INFO] [stderr] 132 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 147 | | ) [INFO] [stderr] 148 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:175:1 [INFO] [stderr] | [INFO] [stderr] 175 | / pub fn fang_oost_put_price<'a, S>( [INFO] [stderr] 176 | | num_u:usize, [INFO] [stderr] 177 | | asset:f64, [INFO] [stderr] 178 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 193 | | ) [INFO] [stderr] 194 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:220:1 [INFO] [stderr] | [INFO] [stderr] 220 | / pub fn fang_oost_call_delta<'a, S>( [INFO] [stderr] 221 | | num_u:usize, [INFO] [stderr] 222 | | asset:f64, [INFO] [stderr] 223 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 238 | | ) [INFO] [stderr] 239 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:265:1 [INFO] [stderr] | [INFO] [stderr] 265 | / pub fn fang_oost_put_delta<'a, S>( [INFO] [stderr] 266 | | num_u:usize, [INFO] [stderr] 267 | | asset:f64, [INFO] [stderr] 268 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 283 | | ) [INFO] [stderr] 284 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:317:1 [INFO] [stderr] | [INFO] [stderr] 317 | / pub fn fang_oost_call_theta<'a, S>( [INFO] [stderr] 318 | | num_u:usize, [INFO] [stderr] 319 | | asset:f64, [INFO] [stderr] 320 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 335 | | ) [INFO] [stderr] 336 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:369:1 [INFO] [stderr] | [INFO] [stderr] 369 | / pub fn fang_oost_put_theta<'a, S>( [INFO] [stderr] 370 | | num_u:usize, [INFO] [stderr] 371 | | asset:f64, [INFO] [stderr] 372 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 387 | | ) [INFO] [stderr] 388 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:415:1 [INFO] [stderr] | [INFO] [stderr] 415 | / pub fn fang_oost_call_gamma<'a, S>( [INFO] [stderr] 416 | | num_u:usize, [INFO] [stderr] 417 | | asset:f64, [INFO] [stderr] 418 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 433 | | ) [INFO] [stderr] 434 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/option_pricing.rs:467:1 [INFO] [stderr] | [INFO] [stderr] 467 | / pub fn fang_oost_put_gamma<'a, S>( [INFO] [stderr] 468 | | num_u:usize, [INFO] [stderr] 469 | | asset:f64, [INFO] [stderr] 470 | | strikes:&'a [f64], [INFO] [stderr] ... | [INFO] [stderr] 477 | | fang_oost_call_gamma(num_u, asset, &strikes, rate, t_maturity, cf) [INFO] [stderr] 478 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/monotone_spline.rs:62:12 [INFO] [stderr] | [INFO] [stderr] 62 | }).expect(&format!("Requires x to be between the bounds! x is currently {}, lower bound is {}, upper bound is {}", x, first_x_and_y.0, last_x_and_y.0)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Requires x to be between the bounds! x is currently {}, lower bound is {}, upper bound is {}", x))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/option_calibration.rs:200:27 [INFO] [stderr] | [INFO] [stderr] 200 | let (left, mut right):( [INFO] [stderr] | ___________________________^ [INFO] [stderr] 201 | | Vec<(f64, f64)>, [INFO] [stderr] 202 | | Vec<(f64, f64)> [INFO] [stderr] 203 | | )=padded_strikes_and_option_prices [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/option_calibration.rs:209:21 [INFO] [stderr] | [INFO] [stderr] 209 | let threshold_t=left.first().unwrap().clone();//clone so I can push into right [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*left.first().unwrap()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this function has too many arguments (8/7) [INFO] [stderr] --> src/option_calibration.rs:280:1 [INFO] [stderr] | [INFO] [stderr] 280 | / pub fn generate_fo_estimate<'a, 'b:'a>( [INFO] [stderr] 281 | | strikes_and_option_prices:&'b [OptionStats], [INFO] [stderr] 282 | | u_array:&'b [f64], [INFO] [stderr] 283 | | n:usize, [INFO] [stderr] ... | [INFO] [stderr] 311 | | }) [INFO] [stderr] 312 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::too_many_arguments)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stderr] [INFO] [stderr] warning: this lifetime isn't used in the function definition [INFO] [stderr] --> src/option_calibration.rs:355:19 [INFO] [stderr] | [INFO] [stderr] 355 | pub fn obj_fn_arr<'a>( [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::extra_unused_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/option_calibration.rs:412:9 [INFO] [stderr] | [INFO] [stderr] 412 | assert_eq!(result, expected); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/option_calibration.rs:412:9 [INFO] [stderr] | [INFO] [stderr] 412 | assert_eq!(result, expected); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/option_calibration.rs:441:9 [INFO] [stderr] | [INFO] [stderr] 441 | assert_eq!(sp_result, 28.3/asset-max_zero_or_number(1.0-(160.0/asset)*discount)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/option_calibration.rs:441:9 [INFO] [stderr] | [INFO] [stderr] 441 | assert_eq!(sp_result, 28.3/asset-max_zero_or_number(1.0-(160.0/asset)*discount)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `fang_oost_option`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "8fc4b4557052b3584fafedc16fe546a6aabe6fae4f296bc020324d341e1cb5e7"` [INFO] running `"docker" "rm" "-f" "8fc4b4557052b3584fafedc16fe546a6aabe6fae4f296bc020324d341e1cb5e7"` [INFO] [stdout] 8fc4b4557052b3584fafedc16fe546a6aabe6fae4f296bc020324d341e1cb5e7