Bump edition and MSRV
MODIFY
.github/workflows/opencv-rust.yml
.github/workflows/opencv-rust.yml
@@ -164,3 +164,25 @@ jobs:
- name: Run a documentation generation test
run: ci/docs-rs.sh
shell: bash
+
+ msrv:
+ runs-on: ubuntu-20.04
+ env:
+ OPENCV_VERSION: 4.2.0
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Install dependencies
+ env:
+ OS_FAMILY: ${{ runner.os }}
+ run: ci/install.sh
+ shell: bash
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@1.58.0
+
+ - name: Test project
+ env:
+ OS_FAMILY: ${{ runner.os }}
+ run: ci/msrv.sh
+ shell: bash

MODIFY
Cargo.toml
Cargo.toml
@@ -7,7 +7,7 @@ readme = "README.md"
keywords = ["opencv", "vision"]
license = "MIT"
version = "0.75.0"
-edition = "2018"
+edition = "2021"
authors = ["Pro <twisted.fall@gmail.com>", "Mathieu Poumeyrol <kali@zoy.org>"]
autoexamples = false # not all examples compile on just any system

MODIFY
README.md
README.md
@@ -308,9 +308,9 @@ The following OpenCV versions are supported at the moment:
* 3.4
* 4.x
-### Minimum rustc version
+### Minimum rustc version (MSRV)
-Currently, version 1.53.0 is required, but generally you should use the latest stable rustc to compile this crate.
+Currently, version 1.58.0 is required, but generally you should use the latest stable rustc to compile this crate.
### Platform support

MODIFY
binding-generator/Cargo.toml
binding-generator/Cargo.toml
@@ -5,7 +5,7 @@ repository = "https://github.com/twistedfall/opencv-rust"
version = "0.53.0"
license = "MIT"
authors = ["Pro <twisted.fall@gmail.com>"]
-edition = "2018"
+edition = "2021"
[lib]

ADD
ci/msrv.sh
+#!/bin/bash
+
+set -vex
+
+if [[ "$OPENCV_VERSION" == "4.2.0" ]]; then
+ rm -vf tests/*4_2_0_norun.rs
+fi
+
+echo "=== Current directory: $(pwd)"
+echo "=== Environment variable dump:"
+export
+echo "=== Target settings:"
+rustc --print=cfg
+
+cargo clippy -vv --all-targets --all-features --workspace --tests

Bump edition and MSRV