Skip to content

Fix Vec::new() type annotation requirement in listing-08-03 - #4485

Closed
thebadaruddinshaikh wants to merge 1 commit into
rust-lang:mainfrom
thebadaruddinshaikh:fix-vec-type-annotation
Closed

Fix Vec::new() type annotation requirement in listing-08-03#4485
thebadaruddinshaikh wants to merge 1 commit into
rust-lang:mainfrom
thebadaruddinshaikh:fix-vec-type-annotation

Conversation

@thebadaruddinshaikh

Copy link
Copy Markdown

The current code in listing-08-03 uses Vec::new() without type annotation,
which will not compile as Rust cannot infer the vector's type. Added explicit
type annotation to make the example compilable.

@thebadaruddinshaikh
thebadaruddinshaikh deleted the fix-vec-type-annotation branch August 25, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant