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

nested: fix compiling tests with Rust < 1.74 #188

Merged
merged 1 commit into from
Jan 31, 2024
Merged

nested: fix compiling tests with Rust < 1.74 #188

merged 1 commit into from
Jan 31, 2024

Conversation

decathorpe
Copy link
Contributor

The From implementation that this code relies on was only stabilized in Rust 1.74. Changing the .into() call to .to_vec() is equivalent but works on all recent versions of Rust.

error[E0277]: the trait bound `Vec<u8>: From<&[u8; 5]>` is not satisfied
    --> nested/src/lib.rs:1750:38
     |
1750 |             Value::Binary(Cow::Owned(b"owned".into())),
     |                                      ^^^^^^^^ ---- required by a bound introduced by this call
     |                                      |
     |                                      the trait `From<&[u8; 5]>` is not implemented for `Vec<u8>`
     |
     = note: required for `&[u8; 5]` to implement `Into<Vec<u8>>`
help: consider dereferencing here
     |
1750 |             Value::Binary(Cow::Owned(*b"owned".into())),
     |                                      +

c.f. https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html#stabilized-apis

@KodrAus
Copy link
Collaborator

KodrAus commented Jan 31, 2024

Thanks @decathorpe!

@KodrAus KodrAus merged commit e6c55d3 into sval-rs:main Jan 31, 2024
25 checks passed
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