parse "std::string" and "cv::String"
MODIFY
gen_rust.py
gen_rust.py
@@ -12,7 +12,6 @@ from string import Template
# fixme returning MatAllocator (trait) by reference is bad, check knearestneighbour
-# fixme add getcpufeaturesline
# fixme consume arg for by_ptr settable properties
# fixme field comments //! in the end are transferred to the next field
@@ -2229,7 +2228,7 @@ def parse_type(gen, typeid):
return RawPtrTypeInfo(gen, full_typeid, gen.get_type_info(typeid[:-1].strip()))
elif typeid.endswith("[]"):
return RawPtrTypeInfo(gen, full_typeid, gen.get_type_info(typeid[:-2].strip()))
- elif typeid == "string" or typeid == "String":
+ elif typeid in ("string", "String", "std::string", "cv::String"):
return StringTypeInfo(gen, full_typeid)
elif typeid == "":
raise NameError("empty type detected")

MODIFY
tests/core.rs
tests/core.rs
-use opencv::core::{CV_32S, CV_32SC3, CV_64F, CV_64FC1, CV_8U, CV_8UC2, MAKETYPE, Moments};
+use opencv::core::{self, CV_32S, CV_32SC3, CV_64F, CV_64FC1, CV_8U, CV_8UC2, MAKETYPE, Moments};
#[test]
fn make_type() {
@@ -14,3 +14,9 @@ fn moments() {
assert_eq!(0., moments.m12);
assert_eq!(0., moments.mu30);
}
+
+#[test]
+fn cpu_features_line() {
+ let cpu_feats = core::get_cpu_features_line().unwrap();
+ assert!(cpu_feats.is_ascii());
+}

parse "std::string" and "cv::String"