diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 141e2b5..0d33e91 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: rust: - - 1.46.0 + - 1.51.0 - stable steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 911d9cc..9a53de1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Rename `NormalizedF32::from_u8` into `NormalizedF32::new_u8`. - Rename `NormalizedF32::new_bounded` into `NormalizedF32::new_clamped`. - Use explicit SIMD intrinsic instead of relying on `safe_arch`. +- MSRV bumped to 1.51 ## [0.7.0] - 2022-07-03 ### Added diff --git a/Cargo.toml b/Cargo.toml index cbc915c..b4a9c8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,7 @@ members = ["path"] [dependencies] arrayref = "0.3.6" -# do not update to 0.6, because it requires Rust >= 1.51 -arrayvec = { version = "0.5", default-features = false } +arrayvec = { version = "0.7", default-features = false } bytemuck = "1.4" cfg-if = "1" png = { version = "0.17", optional = true } diff --git a/README.md b/README.md index 48f5ee3..0f6943e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Build Status](https://github.com/RazrFalcon/tiny-skia/workflows/Rust/badge.svg) [![Crates.io](https://img.shields.io/crates/v/tiny-skia.svg)](https://crates.io/crates/tiny-skia) [![Documentation](https://docs.rs/tiny-skia/badge.svg)](https://docs.rs/tiny-skia) -[![Rust 1.46+](https://img.shields.io/badge/rust-1.46+-orange.svg)](https://www.rust-lang.org) +[![Rust 1.51+](https://img.shields.io/badge/rust-1.51+-orange.svg)](https://www.rust-lang.org) `tiny-skia` is a tiny [Skia] subset ported to Rust. diff --git a/path/README.md b/path/README.md index 372b291..5429801 100644 --- a/path/README.md +++ b/path/README.md @@ -2,7 +2,7 @@ ![Build Status](https://github.com/RazrFalcon/tiny-skia/workflows/Rust/badge.svg) [![Crates.io](https://img.shields.io/crates/v/tiny-skia-path.svg)](https://crates.io/crates/tiny-skia-path) [![Documentation](https://docs.rs/tiny-skia-path/badge.svg)](https://docs.rs/tiny-skia-path) -[![Rust 1.46+](https://img.shields.io/badge/rust-1.46+-orange.svg)](https://www.rust-lang.org) +[![Rust 1.51+](https://img.shields.io/badge/rust-1.51+-orange.svg)](https://www.rust-lang.org) A [tiny-skia](https://github.com/RazrFalcon/tiny-skia) Bezier path implementation. diff --git a/src/edge_clipper.rs b/src/edge_clipper.rs index d664e88..3c4a892 100644 --- a/src/edge_clipper.rs +++ b/src/edge_clipper.rs @@ -34,7 +34,7 @@ macro_rules! copy_4_points { /// Max curvature in X and Y split cubic into 9 pieces, * (line + cubic). const MAX_VERBS: usize = 18; -pub type ClippedEdges = ArrayVec<[PathEdge; MAX_VERBS]>; +pub type ClippedEdges = ArrayVec; pub struct EdgeClipper { clip: Rect, diff --git a/src/pipeline/mod.rs b/src/pipeline/mod.rs index f3021b3..ecf752b 100644 --- a/src/pipeline/mod.rs +++ b/src/pipeline/mod.rs @@ -329,7 +329,7 @@ pub struct TileCtx { } pub struct RasterPipelineBuilder { - stages: ArrayVec<[Stage; MAX_STAGES]>, + stages: ArrayVec, force_hq_pipeline: bool, pub ctx: Context, } @@ -394,7 +394,7 @@ impl RasterPipelineBuilder { .all(|stage| !lowp::fn_ptr_eq(lowp::STAGES[*stage as usize], lowp::null_fn)); if self.force_hq_pipeline || !is_lowp_compatible { - let mut functions: ArrayVec<_> = self.stages.iter() + let mut functions: ArrayVec<_, MAX_STAGES> = self.stages.iter() .map(|stage| highp::STAGES[*stage as usize] as highp::StageFn) .collect(); functions.push(highp::just_return as highp::StageFn); @@ -422,7 +422,7 @@ impl RasterPipelineBuilder { ctx: self.ctx, } } else { - let mut functions: ArrayVec<_> = self.stages.iter() + let mut functions: ArrayVec<_, MAX_STAGES> = self.stages.iter() .map(|stage| lowp::STAGES[*stage as usize] as lowp::StageFn) .collect(); functions.push(lowp::just_return as lowp::StageFn); @@ -451,12 +451,12 @@ impl RasterPipelineBuilder { pub enum RasterPipelineKind { High { - functions: ArrayVec<[highp::StageFn; MAX_STAGES]>, - tail_functions: ArrayVec<[highp::StageFn; MAX_STAGES]>, + functions: ArrayVec, + tail_functions: ArrayVec, }, Low { - functions: ArrayVec<[lowp::StageFn; MAX_STAGES]>, - tail_functions: ArrayVec<[lowp::StageFn; MAX_STAGES]>, + functions: ArrayVec, + tail_functions: ArrayVec, }, }