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

WIP: should fail #7

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ jobs:
# prost's default features to compile.
- name: prost-build check
run: cargo check --manifest-path prost-build/Cargo.toml
- name: tests-no-std cargo-no-std-check
run: cargo no-std-check --manifest-path tests-no-std/Cargo.toml

check-readme:
name: Check README
Expand Down
6 changes: 3 additions & 3 deletions tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ where

let mut buf1 = Vec::new();
if let Err(error) = all_types.encode(&mut buf1) {
return RoundtripResult::Error(error.into());
return RoundtripResult::Error(anyhow!(error));
}
let buf1 = buf1;
if encoded_len != buf1.len() {
Expand All @@ -217,12 +217,12 @@ where

let roundtrip = match M::decode(buf1.as_slice()) {
Ok(roundtrip) => roundtrip,
Err(error) => return RoundtripResult::Error(anyhow::Error::new(error)),
Err(error) => return RoundtripResult::Error(anyhow!(error)),
};

let mut buf2 = Vec::new();
if let Err(error) = roundtrip.encode(&mut buf2) {
return RoundtripResult::Error(error.into());
return RoundtripResult::Error(anyhow!(error));
}
let buf2 = buf2;
let buf3 = roundtrip.encode_to_vec();
Expand Down
Loading