Skip to content

Commit 90ec878

Browse files
committed
style: apply rustfmt formatting
Fix import ordering and line wrapping to match rustfmt standards.
1 parent 5f6a312 commit 90ec878

File tree

1 file changed

+5
-11
lines changed
  • algorithms/linfa-ensemble/src

1 file changed

+5
-11
lines changed

algorithms/linfa-ensemble/src/lib.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ mod tests {
226226

227227
#[test]
228228
fn test_adaboost_early_stopping_on_perfect_fit() {
229-
use ndarray::Array2;
230229
use linfa::DatasetBase;
230+
use ndarray::Array2;
231231

232232
// Create a simple linearly separable dataset
233233
let records = Array2::from_shape_vec(
@@ -261,15 +261,12 @@ mod tests {
261261

262262
#[test]
263263
fn test_adaboost_single_class_error() {
264-
use ndarray::Array2;
265264
use linfa::DatasetBase;
265+
use ndarray::Array2;
266266

267267
// Create dataset with only one class
268-
let records = Array2::from_shape_vec(
269-
(4, 2),
270-
vec![0.0, 0.0, 0.1, 0.1, 0.2, 0.2, 0.3, 0.3],
271-
)
272-
.unwrap();
268+
let records =
269+
Array2::from_shape_vec((4, 2), vec![0.0, 0.0, 0.1, 0.1, 0.2, 0.2, 0.3, 0.3]).unwrap();
273270
let targets = ndarray::array![0, 0, 0, 0]; // All same class
274271
let dataset = DatasetBase::new(records, targets);
275272

@@ -278,10 +275,7 @@ mod tests {
278275
.n_estimators(10)
279276
.fit(&dataset);
280277

281-
assert!(
282-
result.is_err(),
283-
"Should fail with single class dataset"
284-
);
278+
assert!(result.is_err(), "Should fail with single class dataset");
285279
}
286280

287281
#[test]

0 commit comments

Comments
 (0)