Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logs when freeing string or rust runtime #4

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

stuqdog
Copy link
Member

@stuqdog stuqdog commented Oct 19, 2022

No description provided.

@stuqdog stuqdog requested a review from npmenard as a code owner October 19, 2022 14:29
@stuqdog stuqdog requested a review from njooma October 19, 2022 14:29
@stuqdog stuqdog merged commit 2d175f4 into viamrobotics:main Oct 19, 2022
@@ -255,5 +256,6 @@ pub extern "C" fn free_rust_runtime(rt_ptr: Option<Box<Ffi>>) -> i32 {
}
None => {}
}
log::debug!("Freeing rust runtime");
0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An off-topic question: Why does this function have a return value? If the argument is None, we return -1, and if it's not, we return 0. and the caller already knew what the argument was before they passed it to us. So, what benefit does the return value provide?

@stuqdog stuqdog deleted the add-file-handle-close-logging branch March 24, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants