Skip to content

Commit 6c5b2a2

Browse files
committed
future: introduce CassFuture::make_ready_raw()
1 parent 96f1c21 commit 6c5b2a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scylla-rust-wrapper/src/future.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ enum FutureError {
7979
struct JoinHandleTimeout(JoinHandle<()>);
8080

8181
impl CassFuture {
82+
pub(crate) fn make_ready_raw(res: CassFutureResult) -> CassOwnedSharedPtr<CassFuture, CMut> {
83+
Self::new_ready(res).into_raw()
84+
}
85+
8286
pub(crate) fn make_raw(
8387
fut: impl Future<Output = CassFutureResult> + Send + 'static,
8488
#[cfg(cpp_integration_testing)] recording_listener: Option<
@@ -133,8 +137,6 @@ impl CassFuture {
133137
cass_fut
134138
}
135139

136-
// This is left just because it might be useful in tests.
137-
#[expect(unused)]
138140
pub(crate) fn new_ready(r: CassFutureResult) -> Arc<Self> {
139141
Arc::new(CassFuture {
140142
state: Mutex::new(CassFutureState::default()),

0 commit comments

Comments
 (0)