numinnex commented on code in PR #1948:
URL: https://github.com/apache/iggy/pull/1948#discussion_r2183613833
##########
core/connectors/sdk/src/source.rs:
##########
@@ -80,7 +85,15 @@ impl<T: Source + std::fmt::Debug + 'static>
SourceContainer<T> {
return -1;
};
- let mut source = factory(id, config);
+ let state = if state_ptr.is_null() {
+ None
+ } else {
+ let state = std::slice::from_raw_parts(state_ptr, state_len);
Review Comment:
It's also question of the `state_ptr` lifetime, if you use `to_vec` to
extend it's lifetime, then it's fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]