Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Debug constraint required in print functions #26

Merged
merged 1 commit into from
Oct 29, 2022
Merged

Conversation

sohang3112
Copy link
Contributor

Debug constraint is required for K, V in functions print_pair, print_hashmap because code like:

println!("{some_variable:#?}");

requires some_variable to implement Debug trait.

Without this change, there is Compile Error.

`Debug` constraint is required for `K`, `V` in functions `print_pair`, `print_hashmap`  because code like:
```rust
println!("{some_variable:#?}");
```
requires `some_variable` to implement `Debug` trait.
@tfpk
Copy link
Owner

tfpk commented Oct 29, 2022

Thanks :)

@tfpk tfpk merged commit 7a0eb79 into tfpk:main Oct 29, 2022
@sohang3112 sohang3112 deleted the patch-1 branch October 29, 2022 08:05
@sohang3112
Copy link
Contributor Author

Actually I couldn't solve this one (10th exercise). My code is this. Can you tell me what I'm doing wrong here?

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.

2 participants