Bump MSRV to 1.88
This commit is contained in:
1 parent
fb4ee9b377
commit
abf3cc617d
5 files changed
+8
-8
No files matched your search
@@ -9,14 +9,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust: ["1.85.0", stable, beta, nightly]
|
rust: ["1.88.0", stable, beta, nightly]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
if: ${{ matrix.rust == '1.85.0' }}
|
if: ${{ matrix.rust == '1.88.0' }}
|
||||||
- name: Generate Cargo.lock with minimal-version dependencies
|
- name: Generate Cargo.lock with minimal-version dependencies
|
||||||
if: ${{ matrix.rust == '1.85.0' }}
|
if: ${{ matrix.rust == '1.88.0' }}
|
||||||
run: cargo -Zminimal-versions generate-lockfile
|
run: cargo -Zminimal-versions generate-lockfile
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@v1
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: build
|
- name: build
|
||||||
run: cargo build -v
|
run: cargo build -v
|
||||||
- name: test
|
- name: test
|
||||||
if: ${{ matrix.rust != '1.85.0' }}
|
if: ${{ matrix.rust != '1.88.0' }}
|
||||||
run: cargo test -v && cargo doc -v
|
run: cargo test -v && cargo doc -v
|
||||||
|
|
||||||
features:
|
features:
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ edition = "2021"
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
# note: when changed, also update test runner in `.github/workflows/rust.yml`
|
# note: when changed, also update test runner in `.github/workflows/rust.yml`
|
||||||
rust-version = "1.85.0"
|
rust-version = "1.88.0"
|
||||||
|
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "TIFF decoding and encoding library in pure Rust"
|
description = "TIFF decoding and encoding library in pure Rust"
|
||||||
|
|||||||
@@ -1029,7 +1029,7 @@ impl Image {
|
|||||||
|
|
||||||
debug_assert!(bits_per_pixel >= photometric_bit_end);
|
debug_assert!(bits_per_pixel >= photometric_bit_end);
|
||||||
|
|
||||||
if bits_per_pixel % 8 != 0 || photometric_bit_end % 8 != 0 {
|
if !bits_per_pixel.is_multiple_of(8) || !photometric_bit_end.is_multiple_of(8) {
|
||||||
return Err(TiffError::UnsupportedError(
|
return Err(TiffError::UnsupportedError(
|
||||||
TiffUnsupportedError::InterpretationWithBits(
|
TiffUnsupportedError::InterpretationWithBits(
|
||||||
self.photometric_interpretation,
|
self.photometric_interpretation,
|
||||||
|
|||||||
+1
-1
@@ -403,7 +403,7 @@ impl<'a, W: 'a + Write + Seek, K: TiffKind> DirectoryEncoder<'a, W, K> {
|
|||||||
/// Returns an [`Entry`]. If the value is short enough it will *not* be written in the file but
|
/// Returns an [`Entry`]. If the value is short enough it will *not* be written in the file but
|
||||||
/// stored in the entry's offset field.
|
/// stored in the entry's offset field.
|
||||||
pub fn write_entry_bytes(&mut self, ty: Type, data: &[u8]) -> TiffResult<Entry> {
|
pub fn write_entry_bytes(&mut self, ty: Type, data: &[u8]) -> TiffResult<Entry> {
|
||||||
if data.len() % usize::from(ty.byte_len()) != 0 {
|
if !data.len().is_multiple_of(usize::from(ty.byte_len())) {
|
||||||
return Err(TiffError::UsageError(UsageError::MismatchedEntryLength {
|
return Err(TiffError::UsageError(UsageError::MismatchedEntryLength {
|
||||||
ty,
|
ty,
|
||||||
found: data.len(),
|
found: data.len(),
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ impl<W: Write> TiffWriter<W> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn pad_word_boundary(&mut self) -> Result<(), io::Error> {
|
pub fn pad_word_boundary(&mut self) -> Result<(), io::Error> {
|
||||||
if self.offset % 4 != 0 {
|
if !self.offset.is_multiple_of(4) {
|
||||||
let padding = [0, 0, 0];
|
let padding = [0, 0, 0];
|
||||||
let padd_len = 4 - (self.offset % 4);
|
let padd_len = 4 - (self.offset % 4);
|
||||||
self.writer.write_all(&padding[..padd_len as usize])?;
|
self.writer.write_all(&padding[..padd_len as usize])?;
|
||||||
|
|||||||
Reference in new issue
Block a user