Skip to content

Commit 63a8374

Browse files
committed
[DOCS] Enhance documentation for ffi_util module.
1 parent 16ef3d0 commit 63a8374

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/libcprover-rust/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ pub mod cprover_api {
2424
}
2525
}
2626

27+
/// Module containing utility functions for translating between types across
28+
/// the FFI boundary.
2729
pub mod ffi_util {
2830
use crate::cprover_api::_translate_vector_of_string;
2931
use cxx::CxxString;
@@ -38,10 +40,10 @@ pub mod ffi_util {
3840
.collect()
3941
}
4042

41-
/// This is a utility function, whose aim is to simplify direct printing of the messages
42-
/// that we get from CBMC's C++ API. Underneath, it's using translate_response_buffer
43-
/// to translate the C++ types into Rust types and then prints out the strings contained
44-
/// in the resultant rust vector.
43+
/// This function aims to simplify direct printing of the messages that we get
44+
/// from CBMC's C++ API. Underneath, it's using [translate_cpp_vector_to_rust]
45+
/// to translate the C++ types into Rust types and then prints out the strings
46+
/// contained in the resultant Rust vector.
4547
pub fn print_response(vec: &CxxVector<CxxString>) {
4648
let vec: Vec<String> = translate_response_buffer(vec);
4749

@@ -59,7 +61,7 @@ pub mod ffi_util {
5961

6062
// To test run "CBMC_LIB_DIR=<path_to_build/libs> SAT_IMPL=minisat2 cargo test -- --test-threads=1 --nocapture"
6163
#[cfg(test)]
62-
mod tests {
64+
mod tests
6365
use super::*;
6466
use cxx::let_cxx_string;
6567
use std::process;

0 commit comments

Comments
 (0)