Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type annotation for collection in parse_owned function #690

Closed

Conversation

benracine
Copy link

Explicitly annotate the type of items collected from format_items to resolve
compiler error E0282. The type Box<_> ensures correct inference of the boxed
collection type. This resolves issues encountered during compilation with
Ferrocene.

Closes: #689

    Explicitly annotate the type of items collected from format_items to resolve
    compiler error E0282. The type Box<_> ensures correct inference of the boxed
    collection type. This resolves issues encountered during compilation with
    Ferrocene.

    Closes: time-rs#689
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.7%. Comparing base (4a74924) to head (42be41a).
Report is 41 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #690     +/-   ##
=======================================
- Coverage   97.8%   97.7%   -0.1%     
=======================================
  Files         81      83      +2     
  Lines       9378    9001    -377     
=======================================
- Hits        9169    8794    -375     
+ Misses       209     207      -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhpratt jhpratt closed this Jul 3, 2024
@jhpratt jhpratt added the C-duplicate Category: exact duplicate label Jul 3, 2024
craftyguy added a commit to craftyguy/display-switch that referenced this pull request Aug 15, 2024
This version includes a fix[1] for the following build failure:

   Compiling time v0.3.30                                                                                                      error[E0282]: type annotations needed for `Box<_>`
  --> /home/clayton/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.30/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
   |              ++++++++

1. time-rs/time#690
@time-rs time-rs locked and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-duplicate Category: exact duplicate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants