robertknight / ocrs

Rust library and CLI tool for OCR (extracting text from images)
Apache License 2.0
1.21k stars 54 forks source link

Compile error regarding `div_ceil` usage #18

Closed igor-yusupov closed 9 months ago

igor-yusupov commented 9 months ago

I got an error when trying to run the example with the command cargo run -r --example hello_ocr rust-book.jpg

error[E0658]: use of unstable library feature 'int_roundings'
  --> cargo/registry/src/index.crates.io-6f17d22bba15001f/rten-0.2.0/src/iter_util.rs:26:40
   |
26 |         let len = self.remainder.len().div_ceil(self.chunk_size);
   |                                        ^^^^^^^^
   |
   = note: see issue #88581 <https://github.com/rust-lang/rust/issues/88581> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `rten` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
igor-yusupov commented 9 months ago

btw I have updated rust version and now it works. I think we can close the issue :)

robertknight commented 9 months ago

Indeed, div_ceil was stabilized only recently in Rust v1.73.0. This project will always compile with stable Rust, but it currently only promises to work with recent stable releases.