Skip to content

Commit 55344a5

Browse files
committed
fix: unused mut vars
1 parent 062dc54 commit 55344a5

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

stochastic-rs-copulas/tests/bivariate_recovery.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn clayton_tau_one_returns_infinity() {
4848
fn gumbel_theta_from_tau_closed_form() {
4949
// Gumbel: θ = 1 / (1 - τ), τ ∈ [0, 1).
5050
for &tau in &[0.0_f64, 0.1, 0.25, 0.5, 0.75, 0.9] {
51-
let mut g = Gumbel::new(None, Some(tau));
51+
let g = Gumbel::new(None, Some(tau));
5252
let theta = g.compute_theta();
5353
let expected = 1.0 / (1.0 - tau);
5454
approx_eq(theta, expected, 1e-12);
@@ -57,29 +57,29 @@ fn gumbel_theta_from_tau_closed_form() {
5757

5858
#[test]
5959
fn gumbel_tau_one_returns_infinity() {
60-
let mut g = Gumbel::new(None, Some(1.0));
60+
let g = Gumbel::new(None, Some(1.0));
6161
let theta = g.compute_theta();
6262
assert!(theta.is_infinite() && theta > 0.0);
6363
}
6464

6565
#[test]
6666
fn frank_theta_zero_for_independence() {
67-
let mut f = Frank::new(None, Some(0.0));
67+
let f = Frank::new(None, Some(0.0));
6868
let theta = f.compute_theta();
6969
approx_eq(theta, 0.0, 1e-9);
7070
}
7171

7272
#[test]
7373
fn frank_theta_sign_matches_tau() {
7474
// Frank theta has the same sign as tau, opposite sign for negative tau.
75-
let mut f_pos = Frank::new(None, Some(0.5));
75+
let f_pos = Frank::new(None, Some(0.5));
7676
let theta_pos = f_pos.compute_theta();
7777
assert!(
7878
theta_pos > 0.0,
7979
"expected positive θ for τ > 0, got {theta_pos}"
8080
);
8181

82-
let mut f_neg = Frank::new(None, Some(-0.5));
82+
let f_neg = Frank::new(None, Some(-0.5));
8383
let theta_neg = f_neg.compute_theta();
8484
assert!(
8585
theta_neg < 0.0,
@@ -89,10 +89,10 @@ fn frank_theta_sign_matches_tau() {
8989

9090
#[test]
9191
fn frank_extreme_tau_returns_infinity() {
92-
let mut f1 = Frank::new(None, Some(1.0));
92+
let f1 = Frank::new(None, Some(1.0));
9393
assert!(f1.compute_theta().is_infinite());
9494

95-
let mut fm1 = Frank::new(None, Some(-1.0));
95+
let fm1 = Frank::new(None, Some(-1.0));
9696
assert!(fm1.compute_theta().is_infinite() && fm1.compute_theta() < 0.0);
9797
}
9898

@@ -108,7 +108,7 @@ fn independence_theta_is_zero() {
108108
#[test]
109109
fn frank_tau_theta_roundtrip() {
110110
for &tau in &[-0.6_f64, -0.3, 0.1, 0.3, 0.5, 0.7] {
111-
let mut f = Frank::new(None, Some(tau));
111+
let f = Frank::new(None, Some(tau));
112112
let theta = f.compute_theta();
113113
assert!(theta.is_finite(), "θ blew up for τ={tau}");
114114
// Re-evaluate the tau formula at the recovered theta and check residual ≈ 0.
@@ -138,7 +138,7 @@ fn clayton_tau_theta_roundtrip() {
138138
#[test]
139139
fn gumbel_tau_theta_roundtrip() {
140140
for &tau in &[0.05_f64, 0.25, 0.5, 0.75, 0.95] {
141-
let mut g = Gumbel::new(None, Some(tau));
141+
let g = Gumbel::new(None, Some(tau));
142142
let theta = g.compute_theta();
143143
let tau_back = (theta - 1.0) / theta;
144144
approx_eq(tau_back, tau, 1e-12);

0 commit comments

Comments
 (0)