tinyvector icon indicating copy to clipboard operation
tinyvector copied to clipboard

Fix compilation error caused by outdated dependencies

Open vimkim opened this issue 1 year ago • 0 comments

Description

This PR resolves a compilation error that occurs due to an outdated dependency (time v0.3.22). The error happens because the time crate has a type inference issue in its format_description module. Updating the dependencies resolves this issue, ensuring the project builds successfully.

Steps to Reproduce

  1. Clone the repository.
  2. Run cargo build or cargo run on the project.
  3. Observe the following error:
    error[E0282]: type annotations needed for Box<_>
      --> {hostname...}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.22/src/format_description/parse/mod.rs:83:9
       |
    83 |     let items = format_items
       |         ^^^^^
    ...
    86 |     Ok(items.into())
       |              ---- type must be known at this point
       |
    help: consider giving items an explicit type, where the placeholders _ are specified
       |
    83 |     let items: Box<_> = format_items
       |              ++++++++
    
  4. Running cargo update resolves the issue.

Changes

  • Updated the Cargo.lock file to pull the latest compatible version of the dependencies.

Testing

After running cargo update, the project successfully compiles without any errors.


Thank you for this excellent project! 🙌

vimkim avatar Nov 30 '24 06:11 vimkim