Skip to content

Commit 51672b2

Browse files
Dandandannevi-me
authored andcommitted
ARROW-11091: [Rust][DataFusion] Fix new clippy linting errors
Rust 1.49 introduced some new clippy lints, failing the build. Closes #9061 from Dandandan/rust_clippy Authored-by: Heres, Daniel <danielheres@gmail.com> Signed-off-by: Neville Dipale <nevilledips@gmail.com>
1 parent 709f20d commit 51672b2

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

  • rust/datafusion/src/logical_plan

rust/datafusion/src/logical_plan/plan.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,10 @@ mod tests {
838838
/// test earliy stopping in pre-visit
839839
#[test]
840840
fn early_stoping_pre_visit() {
841-
let mut visitor = StoppingVisitor::default();
842-
visitor.return_false_from_pre_in = OptionalCounter::new(2);
841+
let mut visitor = StoppingVisitor {
842+
return_false_from_pre_in: OptionalCounter::new(2),
843+
..Default::default()
844+
};
843845
let plan = test_plan();
844846
let res = plan.accept(&mut visitor);
845847
assert!(res.is_ok());
@@ -852,8 +854,10 @@ mod tests {
852854

853855
#[test]
854856
fn early_stoping_post_visit() {
855-
let mut visitor = StoppingVisitor::default();
856-
visitor.return_false_from_post_in = OptionalCounter::new(1);
857+
let mut visitor = StoppingVisitor {
858+
return_false_from_post_in: OptionalCounter::new(1),
859+
..Default::default()
860+
};
857861
let plan = test_plan();
858862
let res = plan.accept(&mut visitor);
859863
assert!(res.is_ok());
@@ -907,8 +911,10 @@ mod tests {
907911

908912
#[test]
909913
fn error_pre_visit() {
910-
let mut visitor = ErrorVisitor::default();
911-
visitor.return_error_from_pre_in = OptionalCounter::new(2);
914+
let mut visitor = ErrorVisitor {
915+
return_error_from_pre_in: OptionalCounter::new(2),
916+
..Default::default()
917+
};
912918
let plan = test_plan();
913919
let res = plan.accept(&mut visitor);
914920

@@ -926,8 +932,10 @@ mod tests {
926932

927933
#[test]
928934
fn error_post_visit() {
929-
let mut visitor = ErrorVisitor::default();
930-
visitor.return_error_from_post_in = OptionalCounter::new(1);
935+
let mut visitor = ErrorVisitor {
936+
return_error_from_post_in: OptionalCounter::new(1),
937+
..Default::default()
938+
};
931939
let plan = test_plan();
932940
let res = plan.accept(&mut visitor);
933941
if let Err(e) = res {

0 commit comments

Comments
 (0)