fix code in comment false detection
MODIFY
gen_rust.py
gen_rust.py
@@ -3154,6 +3154,8 @@ class RustWrapperGenerator(object):
text = re.sub("^", comment_prefix + " ", text.strip(), 0, re.M) + "\n"
if deprecated is not None:
text += "#[deprecated = \"{}\"]\n".format(deprecated)
+ # rstrip all lines, this helps with ignoring doctests
+ text = "\n".join(x.rstrip() for x in text.splitlines()) + "\n"
return text

MODIFY
src/hub/sys.rs
src/hub/sys.rs
@@ -98,7 +98,7 @@ pub type cv_return_value_unsigned_long_long = cv_return_value<u64>;
// void
pub type cv_return_value_void = cv_return_value<crate::types::Unit, ()>;
-// cv::bioinspired::RetinaParameters
+// Ptr<FreeType2>
pub type cv_return_value_void_X = cv_return_value<*mut c_void>;
extern "C" {

MODIFY
src/lib.rs
src/lib.rs
@@ -27,7 +27,6 @@ pub mod prelude {
#[cfg(test)]
mod test;
-
cpp! {{
#include "../common_opencv.h"
using namespace cv;

fix code in comment false detection