Skip to content

Commit eb9e431

Browse files
committed
future: unimplement Default for CassFutureState
I believe the Default trait gives no benefit there. Also, this prepares for subsequent commits with the refactor.
1 parent b1ff429 commit eb9e431

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scylla-rust-wrapper/src/future.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ impl BoundCallback {
4848
}
4949
}
5050

51-
#[derive(Default)]
5251
struct CassFutureState {
5352
value: Option<CassFutureResult>,
5453
err_string: Option<String>,
@@ -86,7 +85,12 @@ impl CassFuture {
8685
fut: impl Future<Output = CassFutureResult> + Send + 'static,
8786
) -> Arc<CassFuture> {
8887
let cass_fut = Arc::new(CassFuture {
89-
state: Mutex::new(Default::default()),
88+
state: Mutex::new(CassFutureState {
89+
value: None,
90+
err_string: None,
91+
callback: None,
92+
join_handle: None,
93+
}),
9094
wait_for_value: Condvar::new(),
9195
});
9296
let cass_fut_clone = Arc::clone(&cass_fut);
@@ -117,7 +121,9 @@ impl CassFuture {
117121
Arc::new(CassFuture {
118122
state: Mutex::new(CassFutureState {
119123
value: Some(r),
120-
..Default::default()
124+
err_string: None,
125+
callback: None,
126+
join_handle: None,
121127
}),
122128
wait_for_value: Condvar::new(),
123129
})

0 commit comments

Comments
 (0)