Skip to content

Commit 5d4ff49

Browse files
committed
Cleanup
1 parent 4dd7136 commit 5d4ff49

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Documentation](https://docs.rs/opencv/badge.svg)](https://docs.rs/opencv)
55
[![Package](https://img.shields.io/crates/v/opencv.svg)](https://crates.io/crates/opencv)
66

7-
Experimental Rust bindings for OpenCV 3 and 4.
7+
Rust bindings for the popular [OpenCV](https://opencv.org/) computer vision library.
88

99
The API is usable, but unstable and not very battle-tested; use at your own risk.
1010

build/library.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl Library {
226226
let mut cargo_metadata = Vec::with_capacity(64);
227227
let include_paths: Vec<_> = include_paths.iter().map(PathBuf::from).collect();
228228

229-
let version = Self::version_from_include_paths(&include_paths).ok_or("could not get versions from header files")?;
229+
let version = Self::version_from_include_paths(&include_paths).ok_or("Could not OpenCV version from include_paths")?;
230230

231231
cargo_metadata.extend(Self::process_link_paths(Some(link_paths), vec![], None));
232232
cargo_metadata.extend(Self::process_link_libs(Some(link_libs), vec![], None));
@@ -425,7 +425,7 @@ impl Library {
425425
|| env::var_os("OPENCV_CMAKE_BIN").is_some();
426426
let explicit_vcpkg = env::var_os("VCPKG_ROOT").is_some();
427427
eprintln!(
428-
"=== Detected probe priority based on environment vars: pkg_config: {explicit_pkg_config}, cmake: {explicit_cmake}, vcpkg: {explicit_vcpkg}"
428+
"=== Detected probe priority boost based on environment vars: pkg_config: {explicit_pkg_config}, cmake: {explicit_cmake}, vcpkg: {explicit_vcpkg}"
429429
);
430430

431431
let disabled_probes = env::var("OPENCV_DISABLE_PROBES");

src/boxed_ref.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::traits::{Boxed, OpenCVFromExtern, OpenCVIntoExternContainer, OpenCVTy
1111
#[repr(transparent)]
1212
pub struct BoxedRef<'r, T: Boxed> {
1313
pub(crate) reference: T,
14-
// can make it &'r T, but then it will just take up unnecessary space
1514
referenced_object: PhantomData<&'r T>,
1615
}
1716

src/manual/core/inplace.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ use crate::traits::Boxed;
44
pub trait ModifyInplace {
55
/// Helper function to call OpenCV functions that allow in-place modification of a `Mat` or another similar object. By passing
66
/// a mutable reference to the `Mat` to this function your closure will get called with the read reference and a write references
7-
/// to the same `Mat`. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance
8-
/// sensitive operations. One example of an OpenCV function that allows such in-place modification is `imgproc::threshold`.
7+
/// to the same `Mat`. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
8+
/// but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
9+
/// modification is `imgproc::threshold`.
910
///
1011
/// # Safety
1112
/// Caller must make sure that any functions called inside the closure can act on a `Mat` in-place.
@@ -23,7 +24,7 @@ impl<Mat: Boxed> ModifyInplace for Mat {
2324
}
2425
}
2526

26-
impl<'b, Mat: Boxed> ModifyInplace for BoxedRefMut<'b, Mat> {
27+
impl<Mat: Boxed> ModifyInplace for BoxedRefMut<'_, Mat> {
2728
#[inline(always)]
2829
unsafe fn modify_inplace<Res>(&mut self, f: impl FnOnce(&Self, &mut Self) -> Res) -> Res {
2930
let mut m_alias = BoxedRefMut::from(Mat::from_raw(self.reference.as_raw_mut()));

tests/marshalling_only_latest_opencv.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// Setting and getting fields through Ptr
44
#[test]
55
#[cfg(all(ocvrs_has_module_aruco, any(ocvrs_opencv_branch_34, ocvrs_opencv_branch_4)))]
6+
#[allow(deprecated)]
67
fn field_access_on_ptr() -> opencv::Result<()> {
78
use opencv::aruco::EstimateParameters;
89
use opencv::prelude::*;

tools/generate-bindings.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ all_modules_34="aruco
110110
ml
111111
objdetect
112112
optflow
113-
ovis
114113
phase_unwrapping
115114
photo
116115
plot

0 commit comments

Comments
 (0)