[INFO] fetching crate ublox_derive 0.5.0...
[INFO] testing ublox_derive-0.5.0 against master#0d162b25edd5bf0dba9a22e83b614f1113e90474 for pr-150681
[INFO] extracting crate ublox_derive 0.5.0 into /workspace/builds/worker-1-tc1/source
[INFO] started tweaking crates.io crate ublox_derive 0.5.0
[INFO] finished tweaking crates.io crate ublox_derive 0.5.0
[INFO] tweaked toml for crates.io crate ublox_derive 0.5.0 written to /workspace/builds/worker-1-tc1/source/Cargo.toml
[INFO] validating manifest of crates.io crate ublox_derive 0.5.0 on toolchain 0d162b25edd5bf0dba9a22e83b614f1113e90474
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+0d162b25edd5bf0dba9a22e83b614f1113e90474" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate crates.io crate ublox_derive 0.5.0 already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+0d162b25edd5bf0dba9a22e83b614f1113e90474" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded windows-link v0.2.1
[INFO] [stderr]   Downloaded env_home v0.1.0
[INFO] [stderr]   Downloaded errno v0.3.14
[INFO] [stderr]   Downloaded fnv v1.0.7
[INFO] [stderr]   Downloaded linked-hash-map v0.5.6
[INFO] [stderr]   Downloaded which v8.0.0
[INFO] [stderr]   Downloaded pkg-config v0.3.32
[INFO] [stderr]   Downloaded bincode v1.3.3
[INFO] [stderr]   Downloaded same-file v1.0.6
[INFO] [stderr]   Downloaded adler2 v2.0.1
[INFO] [stderr]   Downloaded serde_core v1.0.228
[INFO] [stderr]   Downloaded diff v0.1.13
[INFO] [stderr]   Downloaded equivalent v1.0.2
[INFO] [stderr]   Downloaded thiserror v2.0.17
[INFO] [stderr]   Downloaded miniz_oxide v0.8.9
[INFO] [stderr]   Downloaded yansi v1.0.1
[INFO] [stderr]   Downloaded crc32fast v1.5.0
[INFO] [stderr]   Downloaded pretty_assertions v1.4.1
[INFO] [stderr]   Downloaded memchr v2.7.6
[INFO] [stderr]   Downloaded indexmap v2.12.1
[INFO] [stderr]   Downloaded hashbrown v0.16.1
[INFO] [stderr]   Downloaded time v0.3.44
[INFO] [stderr]   Downloaded serde_json v1.0.145
[INFO] [stderr]   Downloaded serde v1.0.228
[INFO] [stderr]   Downloaded cc v1.2.49
[INFO] [stderr]   Downloaded quick-xml v0.38.4
[INFO] [stderr]   Downloaded syn v1.0.109
[INFO] [stderr]   Downloaded base64 v0.22.1
[INFO] [stderr]   Downloaded syn v2.0.111
[INFO] [stderr]   Downloaded plist v1.8.0
[INFO] [stderr]   Downloaded flate2 v1.1.5
[INFO] [stderr]   Downloaded once_cell v1.21.3
[INFO] [stderr]   Downloaded rustix v1.1.2
[INFO] [stderr]   Downloaded regex-syntax v0.8.8
[INFO] [stderr]   Downloaded find-msvc-tools v0.1.5
[INFO] [stderr]   Downloaded thiserror-impl v2.0.17
[INFO] [stderr]   Downloaded yaml-rust v0.4.5
[INFO] [stderr]   Downloaded winsafe v0.0.19
[INFO] [stderr]   Downloaded simd-adler32 v0.3.8
[INFO] [stderr]   Downloaded time-macros v0.2.24
[INFO] [stderr]   Downloaded ryu v1.0.20
[INFO] [stderr]   Downloaded proc-macro2 v1.0.103
[INFO] [stderr]   Downloaded deranged v0.5.5
[INFO] [stderr]   Downloaded powerfmt v0.2.0
[INFO] [stderr]   Downloaded time-core v0.1.6
[INFO] [stderr]   Downloaded serde_derive v1.0.228
[INFO] [stderr]   Downloaded winapi-util v0.1.11
[INFO] [stderr]   Downloaded onig_sys v69.9.1
[INFO] [stderr]   Downloaded libc v0.2.178
[INFO] [stderr]   Downloaded num-conv v0.1.0
[INFO] [stderr]   Downloaded itoa v1.0.15
[INFO] [stderr]   Downloaded shlex v1.3.0
[INFO] [stderr]   Downloaded onig v6.5.1
[INFO] [stderr]   Downloaded walkdir v2.5.0
[INFO] [stderr]   Downloaded syntect v5.3.0
[INFO] [stderr]   Downloaded windows-sys v0.61.2
[INFO] [stderr]   Downloaded linux-raw-sys v0.11.0
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+0d162b25edd5bf0dba9a22e83b614f1113e90474" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 3ce9ef94d999dba612636b44b1e940337d7dd2f96e1ebfb3eafe13495aeb3638
[INFO] running `Command { std: "docker" "start" "-a" "3ce9ef94d999dba612636b44b1e940337d7dd2f96e1ebfb3eafe13495aeb3638", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "3ce9ef94d999dba612636b44b1e940337d7dd2f96e1ebfb3eafe13495aeb3638", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "3ce9ef94d999dba612636b44b1e940337d7dd2f96e1ebfb3eafe13495aeb3638", kill_on_drop: false }`
[INFO] [stdout] 3ce9ef94d999dba612636b44b1e940337d7dd2f96e1ebfb3eafe13495aeb3638
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+0d162b25edd5bf0dba9a22e83b614f1113e90474" "build" "--frozen" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] e0cbdef7d1eb919dc43147e741b037ae482aa6cafde77dac8e92ab9fb8fdeccb
[INFO] running `Command { std: "docker" "start" "-a" "e0cbdef7d1eb919dc43147e741b037ae482aa6cafde77dac8e92ab9fb8fdeccb", kill_on_drop: false }`
[INFO] [stderr]    Compiling syn v1.0.109
[INFO] [stderr]    Compiling ublox_derive v0.5.0 (/opt/rustwide/workdir)
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.89s
[INFO] running `Command { std: "docker" "inspect" "e0cbdef7d1eb919dc43147e741b037ae482aa6cafde77dac8e92ab9fb8fdeccb", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "e0cbdef7d1eb919dc43147e741b037ae482aa6cafde77dac8e92ab9fb8fdeccb", kill_on_drop: false }`
[INFO] [stdout] e0cbdef7d1eb919dc43147e741b037ae482aa6cafde77dac8e92ab9fb8fdeccb
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+0d162b25edd5bf0dba9a22e83b614f1113e90474" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 33b8209f75bbcd4e3ded8a952bbd6d45d4dceb336320baef4fbc302bd2037924
[INFO] running `Command { std: "docker" "start" "-a" "33b8209f75bbcd4e3ded8a952bbd6d45d4dceb336320baef4fbc302bd2037924", kill_on_drop: false }`
[INFO] [stderr]    Compiling rustix v1.1.2
[INFO] [stderr]    Compiling env_home v0.1.0
[INFO] [stderr]    Compiling proc-macro2 v1.0.103
[INFO] [stderr]    Compiling diff v0.1.13
[INFO] [stderr]    Compiling pretty_assertions v1.4.1
[INFO] [stderr]    Compiling quote v1.0.42
[INFO] [stderr]    Compiling syn v1.0.109
[INFO] [stderr]    Compiling which v8.0.0
[INFO] [stderr]    Compiling ublox_derive v0.5.0 (/opt/rustwide/workdir)
[INFO] [stderr]     Finished `test` profile [unoptimized + debuginfo] target(s) in 15.51s
[INFO] running `Command { std: "docker" "inspect" "33b8209f75bbcd4e3ded8a952bbd6d45d4dceb336320baef4fbc302bd2037924", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "33b8209f75bbcd4e3ded8a952bbd6d45d4dceb336320baef4fbc302bd2037924", kill_on_drop: false }`
[INFO] [stdout] 33b8209f75bbcd4e3ded8a952bbd6d45d4dceb336320baef4fbc302bd2037924
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+0d162b25edd5bf0dba9a22e83b614f1113e90474" "test" "--frozen", kill_on_drop: false }`
[INFO] [stdout] a717dd99321cec331a93f464958429619b945bbda396d064bfe14eac5cb7bf59
[INFO] running `Command { std: "docker" "start" "-a" "a717dd99321cec331a93f464958429619b945bbda396d064bfe14eac5cb7bf59", kill_on_drop: false }`
[INFO] [stderr]     Finished `test` profile [unoptimized + debuginfo] target(s) in 0.09s
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/ublox_derive-c1d5c2f3f999ec5c)
[INFO] [stdout] 
[INFO] [stdout] running 6 tests
[INFO] [stdout] test tests::test_upgrade_enum ... ok
[INFO] [stdout] test tests::test_extend_bitflags ... ok
[INFO] [stdout] test tests::test_ubx_packet_send ... FAILED
[INFO] [stdout] test tests::test_ubx_packet_recv_dyn_len ... FAILED
[INFO] [stdout] test tests::test_ubx_packet_recv_simple ... FAILED
[INFO] [stdout] test tests::test_define_recv_packets ... FAILED
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout] 
[INFO] [stdout] ---- tests::test_ubx_packet_send stdout ----
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] first mismatch:
[INFO] [stdout] expected:
[INFO] [stdout] # [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (9u16) ; const MAX_PAYLOAD_LEN : u16 = 9u16 ; } # [doc = "Some comment"] # [doc = "Struct that is used to construct packets, see the crate-level documentation for more information"] # [derive (Default)] pub struct TestBuilder { # [doc = ""] pub itow : u32 , # [doc = "this is lat"] pub lat_degrees : f64 , # [doc = "this is a"] pub a : u8 , } impl TestBuilder { pub const PACKET_LEN : usize = 17usize ; # [inline] pub fn into_packet_bytes (self) -> [u8 ; Self :: PACKET_LEN] { let mut ret = [0u8 ; Self :: PACKET_LEN] ; ret [0] = SYNC_CHAR_1 ; ret [1] = SYNC_CHAR_2 ; ret [2] = Test :: CLASS ; ret [3] = Test :: ID ; let pack_len_bytes = 9u16 . to_le_bytes () ; ret [4] = pack_len_bytes [0] ; ret [5] = pack_len_bytes [1] ; let bytes = self . itow . to_le_bytes () ; ret [6usize] = bytes [0usize] ; ret [7usize] = bytes [1usize] ; ret [8usize] = bytes [2usize] ; ret [9usize] = bytes [3usize] ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; ret [10usize] = bytes [0usize] ; ret [11usize] = bytes [1usize] ; ret [12usize] = bytes [2usize] ; ret [13usize] = bytes [3usize] ; let bytes = self . a . to_le_bytes () ; ret [14usize] = bytes [0usize] ; let (ck_a , ck_b) = ubx_checksum (& ret [2 .. (Self :: PACKET_LEN - 2)]) ; ret [Self :: PACKET_LEN - 2] = ck_a ; ret [Self :: PACKET_LEN - 1] = ck_b ; ret } } impl From < TestBuilder > for [u8 ; 17usize] { fn from (x : TestBuilder) -> Self { x . into_packet_bytes () } } impl UbxPacketCreator for TestBuilder { # [inline] fn create_packet < T : MemWriter > (self , out : & mut T) -> Result < () , MemWriterError < T :: Error >> { out . reserve_allocate (17usize) ? ; let len_bytes = 9u16 . to_le_bytes () ; let header = [SYNC_CHAR_1 , SYNC_CHAR_2 , Test :: CLASS , Test :: ID , len_bytes [0] , len_bytes [1] ,] ; out . write (& header) ? ; let mut checksum_calc = UbxChecksumCalc :: default () ; checksum_calc . update (& header [2 ..]) ; let bytes = self . itow . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = self . a . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let (ck_a , ck_b) = checksum_calc . result () ; out . write (& [ck_a , ck_b]) ? ; Ok (()) } }
[INFO] [stdout] got:
[INFO] [stdout] # [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (9u16) ; const MAX_PAYLOAD_LEN : u16 = 9u16 ; } # [doc = "Some comment"] # [doc = "Struct that is used to construct packets, see the crate-level documentation for more information"] # [derive (Default)] pub struct TestBuilder { # [doc = ""] pub itow : u32 , # [doc = "this is lat"] pub lat_degrees : f64 , # [doc = "this is a"] pub a : u8 } impl TestBuilder { pub const PACKET_LEN : usize = 17usize ; # [inline] pub fn into_packet_bytes (self) -> [u8 ; Self :: PACKET_LEN] { let mut ret = [0u8 ; Self :: PACKET_LEN] ; ret [0] = SYNC_CHAR_1 ; ret [1] = SYNC_CHAR_2 ; ret [2] = Test :: CLASS ; ret [3] = Test :: ID ; let pack_len_bytes = 9u16 . to_le_bytes () ; ret [4] = pack_len_bytes [0] ; ret [5] = pack_len_bytes [1] ; let bytes = self . itow . to_le_bytes () ; ret [6usize] = bytes [0usize] ; ret [7usize] = bytes [1usize] ; ret [8usize] = bytes [2usize] ; ret [9usize] = bytes [3usize] ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; ret [10usize] = bytes [0usize] ; ret [11usize] = bytes [1usize] ; ret [12usize] = bytes [2usize] ; ret [13usize] = bytes [3usize] ; let bytes = self . a . to_le_bytes () ; ret [14usize] = bytes [0usize] ; let (ck_a , ck_b) = ubx_checksum (& ret [2 .. (Self :: PACKET_LEN - 2)]) ; ret [Self :: PACKET_LEN - 2] = ck_a ; ret [Self :: PACKET_LEN - 1] = ck_b ; ret } } impl From < TestBuilder > for [u8 ; 17usize] { fn from (x : TestBuilder) -> Self { x . into_packet_bytes () } } impl UbxPacketCreator for TestBuilder { # [inline] fn create_packet < T : MemWriter > (self , out : & mut T) -> Result < () , MemWriterError < T :: Error >> { out . reserve_allocate (17usize) ? ; let len_bytes = 9u16 . to_le_bytes () ; let header = [SYNC_CHAR_1 , SYNC_CHAR_2 , Test :: CLASS , Test :: ID , len_bytes [0] , len_bytes [1]] ; out . write (& header) ? ; let mut checksum_calc = UbxChecksumCalc :: default () ; checksum_calc . update (& header [2 ..]) ; let bytes = self . itow . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = self . a . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let (ck_a , ck_b) = checksum_calc . result () ; out . write (& [ck_a , ck_b]) ? ; Ok (()) } }
[INFO] [stdout] 
[INFO] [stdout] thread 'tests::test_ubx_packet_send' (24) panicked at src/tests.rs:990:9:
[INFO] [stdout] assertion failed: `(left == right)`
[INFO] [stdout] 
[INFO] [stdout] [1mDiff[0m [31m< left[0m / [32mright >[0m :
[INFO] [stdout] [31m<# [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (9u16) ; const MAX_PAYLOAD_LEN : u16 = 9u16 ; } # [doc = "Some comment"] # [doc = "Struct that is used to construct packets, see the crate-level documentation for more information"] # [derive (Default)] pub struct TestBuilder { # [doc = ""] pub itow : u32 , # [doc = "this is lat"] pub lat_degrees : f64 , # [doc = "this is a"] pub a : u8 [0m[1;48;5;52;31m, [0m[31m} impl TestBuilder { pub const PACKET_LEN : usize = 17usize ; # [inline] pub fn into_packet_bytes (self) -> [u8 ; Self :: PACKET_LEN] { let mut ret = [0u8 ; Self :: PACKET_LEN] ; ret [0] = SYNC_CHAR_1 ; ret [1] = SYNC_CHAR_2 ; ret [2] = Test :: CLASS ; ret [3] = Test :: ID ; let pack_len_bytes = 9u16 . to_le_bytes () ; ret [4] = pack_len_bytes [0] ; ret [5] = pack_len_bytes [1] ; let bytes = self . itow . to_le_bytes () ; ret [6usize] = bytes [0usize] ; ret [7usize] = bytes [1usize] ; ret [8usize] = bytes [2usize] ; ret [9usize] = bytes [3usize] ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; ret [10usize] = bytes [0usize] ; ret [11usize] = bytes [1usize] ; ret [12usize] = bytes [2usize] ; ret [13usize] = bytes [3usize] ; let bytes = self . a . to_le_bytes () ; ret [14usize] = bytes [0usize] ; let (ck_a , ck_b) = ubx_checksum (& ret [2 .. (Self :: PACKET_LEN - 2)]) ; ret [Self :: PACKET_LEN - 2] = ck_a ; ret [Self :: PACKET_LEN - 1] = ck_b ; ret } } impl From < TestBuilder > for [u8 ; 17usize] { fn from (x : TestBuilder) -> Self { x . into_packet_bytes () } } impl UbxPacketCreator for TestBuilder { # [inline] fn create_packet < T : MemWriter > (self , out : & mut T) -> Result < () , MemWriterError < T :: Error >> { out . reserve_allocate (17usize) ? ; let len_bytes = 9u16 . to_le_bytes () ; let header = [SYNC_CHAR_1 , SYNC_CHAR_2 , Test :: CLASS , Test :: ID , len_bytes [0] , len_bytes [1][0m[1;48;5;52;31m ,[0m[31m] ; out . write (& header) ? ; let mut checksum_calc = UbxChecksumCalc :: default () ; checksum_calc . update (& header [2 ..]) ; let bytes = self . itow . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = self . a . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let (ck_a , ck_b) = checksum_calc . result () ; out . write (& [ck_a , ck_b]) ? ; Ok (()) } }[0m
[INFO] [stdout] [32m># [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (9u16) ; const MAX_PAYLOAD_LEN : u16 = 9u16 ; } # [doc = "Some comment"] # [doc = "Struct that is used to construct packets, see the crate-level documentation for more information"] # [derive (Default)] pub struct TestBuilder { # [doc = ""] pub itow : u32 , # [doc = "this is lat"] pub lat_degrees : f64 , # [doc = "this is a"] pub a : u8 } impl TestBuilder { pub const PACKET_LEN : usize = 17usize ; # [inline] pub fn into_packet_bytes (self) -> [u8 ; Self :: PACKET_LEN] { let mut ret = [0u8 ; Self :: PACKET_LEN] ; ret [0] = SYNC_CHAR_1 ; ret [1] = SYNC_CHAR_2 ; ret [2] = Test :: CLASS ; ret [3] = Test :: ID ; let pack_len_bytes = 9u16 . to_le_bytes () ; ret [4] = pack_len_bytes [0] ; ret [5] = pack_len_bytes [1] ; let bytes = self . itow . to_le_bytes () ; ret [6usize] = bytes [0usize] ; ret [7usize] = bytes [1usize] ; ret [8usize] = bytes [2usize] ; ret [9usize] = bytes [3usize] ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; ret [10usize] = bytes [0usize] ; ret [11usize] = bytes [1usize] ; ret [12usize] = bytes [2usize] ; ret [13usize] = bytes [3usize] ; let bytes = self . a . to_le_bytes () ; ret [14usize] = bytes [0usize] ; let (ck_a , ck_b) = ubx_checksum (& ret [2 .. (Self :: PACKET_LEN - 2)]) ; ret [Self :: PACKET_LEN - 2] = ck_a ; ret [Self :: PACKET_LEN - 1] = ck_b ; ret } } impl From < TestBuilder > for [u8 ; 17usize] { fn from (x : TestBuilder) -> Self { x . into_packet_bytes () } } impl UbxPacketCreator for TestBuilder { # [inline] fn create_packet < T : MemWriter > (self , out : & mut T) -> Result < () , MemWriterError < T :: Error >> { out . reserve_allocate (17usize) ? ; let len_bytes = 9u16 . to_le_bytes () ; let header = [SYNC_CHAR_1 , SYNC_CHAR_2 , Test :: CLASS , Test :: ID , len_bytes [0] , len_bytes [1]] ; out . write (& header) ? ; let mut checksum_calc = UbxChecksumCalc :: default () ; checksum_calc . update (& header [2 ..]) ; let bytes = self . itow . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = ScaleBack :: < f64 > (1. / 1e-7) . as_i32 (self . lat_degrees) . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let bytes = self . a . to_le_bytes () ; out . write (& bytes) ? ; checksum_calc . update (& bytes) ; let (ck_a , ck_b) = checksum_calc . result () ; out . write (& [ck_a , ck_b]) ? ; Ok (()) } }[0m
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::libunwind::trace
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
[INFO] [stdout]    1:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::trace_unsynchronized::<std[3b51380354919863]::sys::backtrace::_print_fmt::{closure#1}>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
[INFO] [stdout]    2:     0x7ea6e76dca12 - std[3b51380354919863]::sys::backtrace::_print_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:74:9
[INFO] [stdout]    3:     0x7ea6e76dca12 - <<std[3b51380354919863]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[27de1724e4349be2]::fmt::Display>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:44:26
[INFO] [stdout]    4:     0x7ea6e771efca - <core[27de1724e4349be2]::fmt::rt::Argument>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/fmt/rt.rs:152:76
[INFO] [stdout]    5:     0x7ea6e771efca - core[27de1724e4349be2]::fmt::write
[INFO] [stdout]    6:     0x7ea6e76ee4a6 - std[3b51380354919863]::io::default_write_fmt::<alloc[a57f19327c0ad893]::vec::Vec<u8>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:639:11
[INFO] [stdout]    7:     0x7ea6e76ee4a6 - <alloc[a57f19327c0ad893]::vec::Vec<u8> as std[3b51380354919863]::io::Write>::write_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:1994:13
[INFO] [stdout]    8:     0x7ea6e76abf6f - <std[3b51380354919863]::sys::backtrace::BacktraceLock>::print
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:47:9
[INFO] [stdout]    9:     0x7ea6e76abf6f - std[3b51380354919863]::panicking::default_hook::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:292:27
[INFO] [stdout]   10:     0x7ea6e76ceaa9 - std[3b51380354919863]::panicking::default_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:316:9
[INFO] [stdout]   11:     0x6434eb58769e - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   12:     0x6434eb58769e - test[182b2e79ecd7bbd9]::test_main_with_exit_callback::<test[182b2e79ecd7bbd9]::test_main::{closure#0}>::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:145:21
[INFO] [stdout]   13:     0x7ea6e76ced12 - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   14:     0x7ea6e76ced12 - std[3b51380354919863]::panicking::panic_with_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:833:13
[INFO] [stdout]   15:     0x7ea6e76ac028 - std[3b51380354919863]::panicking::panic_handler::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:698:13
[INFO] [stdout]   16:     0x7ea6e76a0069 - std[3b51380354919863]::sys::backtrace::__rust_end_short_backtrace::<std[3b51380354919863]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:182:18
[INFO] [stdout]   17:     0x7ea6e76ad83d - __rustc[d79c0ace40940972]::rust_begin_unwind
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:689:5
[INFO] [stdout]   18:     0x7ea6e771f89c - core[27de1724e4349be2]::panicking::panic_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panicking.rs:80:14
[INFO] [stdout]   19:     0x6434eb4b2a78 - ublox_derive[d0b88179350b4dc5]::tests::run_compare_test
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:990:9
[INFO] [stdout]   20:     0x6434eb4bf1e8 - ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_send
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:548:5
[INFO] [stdout]   21:     0x6434eb4b0897 - ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_send::{closure#0}
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:527:26
[INFO] [stdout]   22:     0x6434eb5476c6 - <ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_send::{closure#0} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   23:     0x6434eb57ba4b - <fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x6434eb57ba4b - test[182b2e79ecd7bbd9]::__rust_begin_short_backtrace::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:663:18
[INFO] [stdout]   25:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:74
[INFO] [stdout]   26:     0x6434eb5882aa - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   27:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   28:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   29:     0x6434eb5882aa - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   30:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:27
[INFO] [stdout]   31:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:607:43
[INFO] [stdout]   32:     0x6434eb583854 - test[182b2e79ecd7bbd9]::run_test::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:637:41
[INFO] [stdout]   33:     0x6434eb583854 - std[3b51380354919863]::sys::backtrace::__rust_begin_short_backtrace::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:166:18
[INFO] [stdout]   34:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:91:13
[INFO] [stdout]   35:     0x6434eb58ada2 - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   36:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   37:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::<(), core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   38:     0x6434eb58ada2 - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   39:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:89:26
[INFO] [stdout]   40:     0x6434eb58ada2 - <std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   41:     0x7ea6e76da0ff - <alloc[a57f19327c0ad893]::boxed::Box<dyn core[27de1724e4349be2]::ops::function::FnOnce<(), Output = ()> + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2206:9
[INFO] [stdout]   42:     0x7ea6e76da0ff - <std[3b51380354919863]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/thread/unix.rs:119:17
[INFO] [stdout]   43:     0x7ea6e744caa4 - <unknown>
[INFO] [stdout]   44:     0x7ea6e74d9a64 - clone
[INFO] [stdout]   45:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::test_ubx_packet_recv_dyn_len stdout ----
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] first mismatch:
[INFO] [stdout] expected:
[INFO] [stdout] # [doc = ""] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = None ; const MAX_PAYLOAD_LEN : u16 = 38u16 ; } # [doc = ""] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; if got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got , }) } } } # [doc = ""] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 38usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 38usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; if got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got , }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 38usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (f1) , & self . f1 ()) ? ; state . serialize_entry (stringify ! (rest) , & FieldIter (self . rest ()) ,) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }
[INFO] [stdout] got:
[INFO] [stdout] # [doc = ""] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = None ; const MAX_PAYLOAD_LEN : u16 = 38u16 ; } # [doc = ""] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; ; if got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got }) } } } # [doc = ""] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 38usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 38usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; ; if got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 38usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (f1) , & self . f1 ()) ? ; state . serialize_entry (stringify ! (rest) , & FieldIter (self . rest ())) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }
[INFO] [stdout] 
[INFO] [stdout] thread 'tests::test_ubx_packet_recv_dyn_len' (21) panicked at src/tests.rs:990:9:
[INFO] [stdout] assertion failed: `(left == right)`
[INFO] [stdout] 
[INFO] [stdout] [1mDiff[0m [31m< left[0m / [32mright >[0m :
[INFO] [stdout] [31m<# [doc = ""] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = None ; const MAX_PAYLOAD_LEN : u16 = 38u16 ; } # [doc = ""] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; if got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got [0m[1;48;5;52;31m, [0m[31m}) } } } # [doc = ""] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 38usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 38usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; if got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got [0m[1;48;5;52;31m, [0m[31m}) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 38usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (f1) , & self . f1 ()) ? ; state . serialize_entry (stringify ! (rest) , & FieldIter (self . rest ())[0m[1;48;5;52;31m ,[0m[31m) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }[0m
[INFO] [stdout] [32m># [doc = ""] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = None ; const MAX_PAYLOAD_LEN : u16 = 38u16 ; } # [doc = ""] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; [0m[1;48;5;22;32m; [0m[32mif got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got }) } } } # [doc = ""] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 38usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 38usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn f1_raw (& self) -> & [u8] { let val = & self . 0 [0usize .. (0usize + 8usize)] ; val } # [doc = ""] # [inline] pub fn f1 (& self) -> & str { let val = & self . 0 [0usize .. (0usize + 8usize)] ; let val = unpack_str (val) ; val } # [doc = ""] # [inline] pub fn rest (& self) -> & [u8] { & self . 0 [8usize ..] } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let got = payload . len () ; let min = 8usize ; [0m[1;48;5;22;32m; [0m[32mif got >= min { Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect : min , got }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 38usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (f1) , & self . f1 ()) . field (stringify ! (rest) , & self . rest ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (f1) , & self . f1 ()) ? ; state . serialize_entry (stringify ! (rest) , & FieldIter (self . rest ())) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }[0m
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::libunwind::trace
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
[INFO] [stdout]    1:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::trace_unsynchronized::<std[3b51380354919863]::sys::backtrace::_print_fmt::{closure#1}>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
[INFO] [stdout]    2:     0x7ea6e76dca12 - std[3b51380354919863]::sys::backtrace::_print_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:74:9
[INFO] [stdout]    3:     0x7ea6e76dca12 - <<std[3b51380354919863]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[27de1724e4349be2]::fmt::Display>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:44:26
[INFO] [stdout]    4:     0x7ea6e771efca - <core[27de1724e4349be2]::fmt::rt::Argument>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/fmt/rt.rs:152:76
[INFO] [stdout]    5:     0x7ea6e771efca - core[27de1724e4349be2]::fmt::write
[INFO] [stdout]    6:     0x7ea6e76ee4a6 - std[3b51380354919863]::io::default_write_fmt::<alloc[a57f19327c0ad893]::vec::Vec<u8>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:639:11
[INFO] [stdout]    7:     0x7ea6e76ee4a6 - <alloc[a57f19327c0ad893]::vec::Vec<u8> as std[3b51380354919863]::io::Write>::write_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:1994:13
[INFO] [stdout]    8:     0x7ea6e76abf6f - <std[3b51380354919863]::sys::backtrace::BacktraceLock>::print
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:47:9
[INFO] [stdout]    9:     0x7ea6e76abf6f - std[3b51380354919863]::panicking::default_hook::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:292:27
[INFO] [stdout]   10:     0x7ea6e76ceaa9 - std[3b51380354919863]::panicking::default_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:316:9
[INFO] [stdout]   11:     0x6434eb58769e - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   12:     0x6434eb58769e - test[182b2e79ecd7bbd9]::test_main_with_exit_callback::<test[182b2e79ecd7bbd9]::test_main::{closure#0}>::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:145:21
[INFO] [stdout]   13:     0x7ea6e76ced12 - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   14:     0x7ea6e76ced12 - std[3b51380354919863]::panicking::panic_with_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:833:13
[INFO] [stdout]   15:     0x7ea6e76ac028 - std[3b51380354919863]::panicking::panic_handler::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:698:13
[INFO] [stdout]   16:     0x7ea6e76a0069 - std[3b51380354919863]::sys::backtrace::__rust_end_short_backtrace::<std[3b51380354919863]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:182:18
[INFO] [stdout]   17:     0x7ea6e76ad83d - __rustc[d79c0ace40940972]::rust_begin_unwind
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:689:5
[INFO] [stdout]   18:     0x7ea6e771f89c - core[27de1724e4349be2]::panicking::panic_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panicking.rs:80:14
[INFO] [stdout]   19:     0x6434eb4b2a78 - ublox_derive[d0b88179350b4dc5]::tests::run_compare_test
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:990:9
[INFO] [stdout]   20:     0x6434eb4e544a - ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_recv_dyn_len
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:360:5
[INFO] [stdout]   21:     0x6434eb4b0927 - ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_recv_dyn_len::{closure#0}
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:340:34
[INFO] [stdout]   22:     0x6434eb547786 - <ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_recv_dyn_len::{closure#0} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   23:     0x6434eb57ba4b - <fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x6434eb57ba4b - test[182b2e79ecd7bbd9]::__rust_begin_short_backtrace::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:663:18
[INFO] [stdout]   25:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:74
[INFO] [stdout]   26:     0x6434eb5882aa - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   27:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   28:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   29:     0x6434eb5882aa - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   30:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:27
[INFO] [stdout]   31:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:607:43
[INFO] [stdout]   32:     0x6434eb583854 - test[182b2e79ecd7bbd9]::run_test::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:637:41
[INFO] [stdout]   33:     0x6434eb583854 - std[3b51380354919863]::sys::backtrace::__rust_begin_short_backtrace::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:166:18
[INFO] [stdout]   34:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:91:13
[INFO] [stdout]   35:     0x6434eb58ada2 - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   36:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   37:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::<(), core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   38:     0x6434eb58ada2 - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   39:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:89:26
[INFO] [stdout]   40:     0x6434eb58ada2 - <std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   41:     0x7ea6e76da0ff - <alloc[a57f19327c0ad893]::boxed::Box<dyn core[27de1724e4349be2]::ops::function::FnOnce<(), Output = ()> + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2206:9
[INFO] [stdout]   42:     0x7ea6e76da0ff - <std[3b51380354919863]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/thread/unix.rs:119:17
[INFO] [stdout]   43:     0x7ea6e744caa4 - <unknown>
[INFO] [stdout]   44:     0x7ea6e74d9a64 - clone
[INFO] [stdout]   45:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::test_ubx_packet_recv_simple stdout ----
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] first mismatch:
[INFO] [stdout] expected:
[INFO] [stdout] # [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (16u16) ; const MAX_PAYLOAD_LEN : u16 = 16u16 ; } # [doc = "Some comment"] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize] ,]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize] ,]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize] ,]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize] ,] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) , }) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got , }) } } } # [doc = "Some comment"] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 16usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 16usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize] ,]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize] ,]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize] ,]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize] ,] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) , }) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got , }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 16usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (itow) , & self . itow ()) ? ; state . serialize_entry (stringify ! (lat) , & self . lat_degrees ()) ? ; state . serialize_entry (stringify ! (a) , & self . a ()) ? ; state . serialize_entry (stringify ! (reserved1) , & self . reserved1 ()) ? ; state . serialize_entry (stringify ! (flags) , & self . flags ()) ? ; state . serialize_entry (stringify ! (b) , & self . b ()) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }
[INFO] [stdout] got:
[INFO] [stdout] # [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (16u16) ; const MAX_PAYLOAD_LEN : u16 = 16u16 ; } # [doc = "Some comment"] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize]] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) }) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got }) } } } # [doc = "Some comment"] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 16usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 16usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize]] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) }) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 16usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (itow) , & self . itow ()) ? ; state . serialize_entry (stringify ! (lat) , & self . lat_degrees ()) ? ; state . serialize_entry (stringify ! (a) , & self . a ()) ? ; state . serialize_entry (stringify ! (reserved1) , & self . reserved1 ()) ? ; state . serialize_entry (stringify ! (flags) , & self . flags ()) ? ; state . serialize_entry (stringify ! (b) , & self . b ()) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }
[INFO] [stdout] 
[INFO] [stdout] thread 'tests::test_ubx_packet_recv_simple' (23) panicked at src/tests.rs:990:9:
[INFO] [stdout] assertion failed: `(left == right)`
[INFO] [stdout] 
[INFO] [stdout] [1mDiff[0m [31m< left[0m / [32mright >[0m :
[INFO] [stdout] [31m<# [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (16u16) ; const MAX_PAYLOAD_LEN : u16 = 16u16 ; } # [doc = "Some comment"] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize][0m[1;48;5;52;31m ,[0m[31m]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize][0m[1;48;5;52;31m ,[0m[31m]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize][0m[1;48;5;52;31m ,[0m[31m]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize][0m[1;48;5;52;31m ,[0m[31m] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) [0m[1;48;5;52;31m, [0m[31m}) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got [0m[1;48;5;52;31m, [0m[31m}) } } } # [doc = "Some comment"] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 16usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 16usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize][0m[1;48;5;52;31m ,[0m[31m]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize][0m[1;48;5;52;31m ,[0m[31m]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize][0m[1;48;5;52;31m ,[0m[31m]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize][0m[1;48;5;52;31m ,[0m[31m] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) [0m[1;48;5;52;31m, [0m[31m}) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got[0m[1;48;5;52;31m ,[0m[31m }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 16usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (itow) , & self . itow ()) ? ; state . serialize_entry (stringify ! (lat) , & self . lat_degrees ()) ? ; state . serialize_entry (stringify ! (a) , & self . a ()) ? ; state . serialize_entry (stringify ! (reserved1) , & self . reserved1 ()) ? ; state . serialize_entry (stringify ! (flags) , & self . flags ()) ? ; state . serialize_entry (stringify ! (b) , & self . b ()) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }[0m
[INFO] [stdout] [32m># [doc = "Some comment"] pub struct Test ; impl UbxPacketMeta for Test { const CLASS : u8 = 1u8 ; const ID : u8 = 2u8 ; const FIXED_PAYLOAD_LEN : Option < u16 > = Some (16u16) ; const MAX_PAYLOAD_LEN : u16 = 16u16 ; } # [doc = "Some comment"] # [doc = "Contains a reference to an underlying buffer, contains accessor methods to retrieve data."] pub struct TestRef < 'a > (pub (crate) & 'a [u8]) ; impl < 'a > TestRef < 'a > { # [inline] pub fn as_bytes (& self) -> & [u8] { self . 0 } # [inline] pub fn payload_len (& self) -> usize { self . 0 . len () } pub fn to_owned (& self) -> TestOwned { self . into () } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize]] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) }) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got }) } } } # [doc = "Some comment"] # [doc = "Owns the underlying buffer of data, contains accessor methods to retrieve data."] # [derive (Clone)] pub struct TestOwned (pub (crate) [u8 ; 16usize]) ; impl TestOwned { pub (crate) const PACKET_SIZE : usize = 16usize ; # [inline] pub fn as_bytes (& self) -> & [u8] { & self . 0 } # [doc = ""] # [inline] pub fn itow (& self) -> u32 { let val = < u32 > :: from_le_bytes ([self . 0 [0usize] , self . 0 [1usize] , self . 0 [2usize] , self . 0 [3usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees_raw (& self) -> i32 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; val } # [doc = "this is lat"] # [inline] pub fn lat_degrees (& self) -> f64 { let val = < i32 > :: from_le_bytes ([self . 0 [4usize] , self . 0 [5usize] , self . 0 [6usize] , self . 0 [7usize]]) ; let val = < f64 > :: from (val) ; let val = val * 1e-7 ; val } # [doc = "this is a"] # [inline] pub fn a (& self) -> u8 { let val = self . 0 [8usize] ; val } # [doc = ""] # [inline] pub fn reserved1 (& self) -> [u8 ; 5] { let val = [self . 0 [9usize] , self . 0 [10usize] , self . 0 [11usize] , self . 0 [12usize] , self . 0 [13usize]] ; val } # [doc = ""] # [inline] pub fn flags_raw (& self) -> u8 { let val = self . 0 [14usize] ; val } # [doc = ""] # [inline] pub fn flags (& self) -> Flags { let val = self . 0 [14usize] ; let val = < Flags > :: from_unchecked (val) ; val } # [doc = ""] # [inline] pub fn b (& self) -> i8 { let val = < i8 > :: from_le_bytes ([self . 0 [15usize]]) ; val } pub (crate) fn validate (payload : & [u8]) -> Result < () , ParserError > { let expect = 16usize ; let got = payload . len () ; if got == expect { let val = payload [14usize] ; if ! < Flags > :: is_valid (val) { return Err (ParserError :: InvalidField { packet : "Test" , field : stringify ! (flags) }) ; } Ok (()) } else { Err (ParserError :: InvalidPacketLen { packet : "Test" , expect , got }) } } } impl < 'a > From < & TestRef < 'a >> for TestOwned { fn from (packet : & TestRef < 'a >) -> Self { let src = packet . as_bytes () ; let mut dst = [0u8 ; 16usize] ; dst [.. src . len ()] . clone_from_slice (src) ; Self (dst) } } impl < 'a > From < TestRef < 'a >> for TestOwned { fn from (packet : TestRef < 'a >) -> Self { (& packet) . into () } } impl core :: fmt :: Debug for TestRef < '_ > { fn fmt (& self , f : & mut core :: fmt :: Formatter < '_ >) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } impl core :: fmt :: Debug for TestOwned { fn fmt (& self , f : & mut core :: fmt :: Formatter) -> core :: fmt :: Result { f . debug_struct ("Test") . field (stringify ! (itow) , & self . itow ()) . field (stringify ! (lat) , & self . lat_degrees ()) . field (stringify ! (a) , & self . a ()) . field (stringify ! (reserved1) , & self . reserved1 ()) . field (stringify ! (flags) , & self . flags ()) . field (stringify ! (b) , & self . b ()) . finish () } } # [cfg (feature = "serde")] impl SerializeUbxPacketFields for TestRef < '_ > { fn serialize_fields < S > (& self , state : & mut S) -> Result < () , S :: Error > where S : serde :: ser :: SerializeMap , { state . serialize_entry (stringify ! (itow) , & self . itow ()) ? ; state . serialize_entry (stringify ! (lat) , & self . lat_degrees ()) ? ; state . serialize_entry (stringify ! (a) , & self . a ()) ? ; state . serialize_entry (stringify ! (reserved1) , & self . reserved1 ()) ? ; state . serialize_entry (stringify ! (flags) , & self . flags ()) ? ; state . serialize_entry (stringify ! (b) , & self . b ()) ? ; Ok (()) } } # [cfg (feature = "serde")] impl serde :: Serialize for TestRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; self . serialize_fields (& mut state) ? ; state . end () } }[0m
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::libunwind::trace
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
[INFO] [stdout]    1:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::trace_unsynchronized::<std[3b51380354919863]::sys::backtrace::_print_fmt::{closure#1}>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
[INFO] [stdout]    2:     0x7ea6e76dca12 - std[3b51380354919863]::sys::backtrace::_print_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:74:9
[INFO] [stdout]    3:     0x7ea6e76dca12 - <<std[3b51380354919863]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[27de1724e4349be2]::fmt::Display>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:44:26
[INFO] [stdout]    4:     0x7ea6e771efca - <core[27de1724e4349be2]::fmt::rt::Argument>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/fmt/rt.rs:152:76
[INFO] [stdout]    5:     0x7ea6e771efca - core[27de1724e4349be2]::fmt::write
[INFO] [stdout]    6:     0x7ea6e76ee4a6 - std[3b51380354919863]::io::default_write_fmt::<alloc[a57f19327c0ad893]::vec::Vec<u8>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:639:11
[INFO] [stdout]    7:     0x7ea6e76ee4a6 - <alloc[a57f19327c0ad893]::vec::Vec<u8> as std[3b51380354919863]::io::Write>::write_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:1994:13
[INFO] [stdout]    8:     0x7ea6e76abf6f - <std[3b51380354919863]::sys::backtrace::BacktraceLock>::print
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:47:9
[INFO] [stdout]    9:     0x7ea6e76abf6f - std[3b51380354919863]::panicking::default_hook::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:292:27
[INFO] [stdout]   10:     0x7ea6e76ceaa9 - std[3b51380354919863]::panicking::default_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:316:9
[INFO] [stdout]   11:     0x6434eb58769e - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   12:     0x6434eb58769e - test[182b2e79ecd7bbd9]::test_main_with_exit_callback::<test[182b2e79ecd7bbd9]::test_main::{closure#0}>::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:145:21
[INFO] [stdout]   13:     0x7ea6e76ced12 - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   14:     0x7ea6e76ced12 - std[3b51380354919863]::panicking::panic_with_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:833:13
[INFO] [stdout]   15:     0x7ea6e76ac028 - std[3b51380354919863]::panicking::panic_handler::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:698:13
[INFO] [stdout]   16:     0x7ea6e76a0069 - std[3b51380354919863]::sys::backtrace::__rust_end_short_backtrace::<std[3b51380354919863]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:182:18
[INFO] [stdout]   17:     0x7ea6e76ad83d - __rustc[d79c0ace40940972]::rust_begin_unwind
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:689:5
[INFO] [stdout]   18:     0x7ea6e771f89c - core[27de1724e4349be2]::panicking::panic_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panicking.rs:80:14
[INFO] [stdout]   19:     0x6434eb4b2a78 - ublox_derive[d0b88179350b4dc5]::tests::run_compare_test
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:990:9
[INFO] [stdout]   20:     0x6434eb4db8d0 - ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_recv_simple
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:37:5
[INFO] [stdout]   21:     0x6434eb4b08f7 - ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_recv_simple::{closure#0}
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:12:33
[INFO] [stdout]   22:     0x6434eb547746 - <ublox_derive[d0b88179350b4dc5]::tests::test_ubx_packet_recv_simple::{closure#0} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   23:     0x6434eb57ba4b - <fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x6434eb57ba4b - test[182b2e79ecd7bbd9]::__rust_begin_short_backtrace::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:663:18
[INFO] [stdout]   25:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:74
[INFO] [stdout]   26:     0x6434eb5882aa - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   27:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   28:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   29:     0x6434eb5882aa - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   30:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:27
[INFO] [stdout]   31:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:607:43
[INFO] [stdout]   32:     0x6434eb583854 - test[182b2e79ecd7bbd9]::run_test::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:637:41
[INFO] [stdout]   33:     0x6434eb583854 - std[3b51380354919863]::sys::backtrace::__rust_begin_short_backtrace::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:166:18
[INFO] [stdout]   34:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:91:13
[INFO] [stdout]   35:     0x6434eb58ada2 - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   36:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   37:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::<(), core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   38:     0x6434eb58ada2 - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   39:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:89:26
[INFO] [stdout]   40:     0x6434eb58ada2 - <std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   41:     0x7ea6e76da0ff - <alloc[a57f19327c0ad893]::boxed::Box<dyn core[27de1724e4349be2]::ops::function::FnOnce<(), Output = ()> + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2206:9
[INFO] [stdout]   42:     0x7ea6e76da0ff - <std[3b51380354919863]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/thread/unix.rs:119:17
[INFO] [stdout]   43:     0x7ea6e744caa4 - <unknown>
[INFO] [stdout]   44:     0x7ea6e74d9a64 - clone
[INFO] [stdout]   45:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- tests::test_define_recv_packets stdout ----
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] warning=Internal rustfmt error
[INFO] [stdout] error: 'rustfmt' is not installed for the custom toolchain '0d162b25edd5bf0dba9a22e83b614f1113e90474'.
[INFO] [stdout] note: this is a custom toolchain, which cannot use `rustup component add`
[INFO] [stdout] help: if you built this toolchain from source, and used `rustup toolchain link`, then you may be able to build the component with `x.py`
[INFO] [stdout] 
[INFO] [stdout] first mismatch:
[INFO] [stdout] expected:
[INFO] [stdout] # [doc = "All possible packets enum"] # [derive (Debug)] # [non_exhaustive] pub enum PacketRef < 'a > { Pack1 (Pack1Ref < 'a >) , Pack2 (Pack2Ref < 'a >) , Unknown (UnknownPacketRef < 'a >) , } # [doc = "All possible packets enum, owning the underlying data"] # [derive (Debug)] # [non_exhaustive] pub enum PacketOwned { Pack1 (Pack1Owned) , Pack2 (Pack2Owned) , Unknown (UnknownPacketOwned < { MAX_PAYLOAD_LEN as usize } >) , } impl < 'a > PacketRef < 'a > { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketRef :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketRef :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketRef :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } pub fn to_owned (& self) -> PacketOwned { self . into () } # [inline] pub fn payload_len (& self) -> usize { match * self { PacketRef :: Pack1 (ref packet) => packet . payload_len () , PacketRef :: Pack2 (ref packet) => packet . payload_len () , PacketRef :: Unknown (ref pack) => pack . payload . len () , } } } impl PacketOwned { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketOwned :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketOwned :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketOwned :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } } pub (crate) fn match_packet (class : u8 , msg_id : u8 , payload : & [u8] ,) -> Result < PacketRef , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack1 (Pack1Ref (payload))) } , (Pack2 :: CLASS , Pack2 :: ID) if < Pack2Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack2 (Pack2Ref (payload))) } , _ => Ok (PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id , })) , } } pub (crate) fn match_packet_owned (class : u8 , msg_id : u8 , payload : & [u8] ,) -> Result < PacketOwned , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack1Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack1 (Pack1Owned (bytes))) } , (Pack2 :: CLASS , Pack2 :: ID) if < Pack2Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack2Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack2 (Pack2Owned (bytes))) } , _ => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; Ok (PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class , msg_id , })) } , } } impl < 'a > From < & PacketRef < 'a >> for PacketOwned { fn from (packet : & PacketRef < 'a >) -> Self { match packet { PacketRef :: Pack1 (packet) => PacketOwned :: Pack1 (packet . into ()) , PacketRef :: Pack2 (packet) => PacketOwned :: Pack2 (packet . into ()) , PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id , }) => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class : * class , msg_id : * msg_id , }) } , } } } const fn max_u16 (a : u16 , b : u16) -> u16 { [a , b] [(a < b) as usize] } pub (crate) const MAX_PAYLOAD_LEN : u16 = max_u16 (Pack2 :: MAX_PAYLOAD_LEN , max_u16 (Pack1 :: MAX_PAYLOAD_LEN , 0u16) ,) ; # [cfg (feature = "serde")] pub struct PacketSerializer < 'a , T > { class : u8 , msg_id : u8 , msg : & 'a T , } # [cfg (feature = "serde")] impl < 'a , T : SerializeUbxPacketFields > serde :: Serialize for PacketSerializer < 'a , T > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; state . serialize_entry ("class" , & self . class) ? ; state . serialize_entry ("msg_id" , & self . msg_id) ? ; self . msg . serialize_fields (& mut state) ? ; state . end () } } # [cfg (feature = "serde")] impl serde :: Serialize for PacketRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { match * self { PacketRef :: Pack1 (ref msg) => PacketSerializer { class : Pack1 :: CLASS , msg_id : Pack1 :: ID , msg , } . serialize (serializer) , PacketRef :: Pack2 (ref msg) => PacketSerializer { class : Pack2 :: CLASS , msg_id : Pack2 :: ID , msg , } . serialize (serializer) , PacketRef :: Unknown (ref pack) => pack . serialize (serializer) , } } }
[INFO] [stdout] got:
[INFO] [stdout] # [doc = "All possible packets enum"] # [derive (Debug)] # [non_exhaustive] pub enum PacketRef < 'a > { Pack1 (Pack1Ref < 'a >) , Pack2 (Pack2Ref < 'a >) , Unknown (UnknownPacketRef < 'a >) } # [doc = "All possible packets enum, owning the underlying data"] # [derive (Debug)] # [non_exhaustive] pub enum PacketOwned { Pack1 (Pack1Owned) , Pack2 (Pack2Owned) , Unknown (UnknownPacketOwned < { MAX_PAYLOAD_LEN as usize } >) } impl < 'a > PacketRef < 'a > { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketRef :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketRef :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketRef :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } pub fn to_owned (& self) -> PacketOwned { self . into () } # [inline] pub fn payload_len (& self) -> usize { match * self { PacketRef :: Pack1 (ref packet) => packet . payload_len () , PacketRef :: Pack2 (ref packet) => packet . payload_len () , PacketRef :: Unknown (ref pack) => pack . payload . len () , } } } impl PacketOwned { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketOwned :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketOwned :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketOwned :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } } pub (crate) fn match_packet (class : u8 , msg_id : u8 , payload : & [u8]) -> Result < PacketRef , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack1 (Pack1Ref (payload))) } (Pack2 :: CLASS , Pack2 :: ID) if < Pack2Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack2 (Pack2Ref (payload))) } _ => Ok (PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id })) , } } pub (crate) fn match_packet_owned (class : u8 , msg_id : u8 , payload : & [u8]) -> Result < PacketOwned , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack1Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack1 (Pack1Owned (bytes))) } (Pack2 :: CLASS , Pack2 :: ID) if < Pack2Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack2Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack2 (Pack2Owned (bytes))) } _ => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; Ok (PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class , msg_id })) } } } impl < 'a > From < & PacketRef < 'a >> for PacketOwned { fn from (packet : & PacketRef < 'a >) -> Self { match packet { PacketRef :: Pack1 (packet) => PacketOwned :: Pack1 (packet . into ()) , PacketRef :: Pack2 (packet) => PacketOwned :: Pack2 (packet . into ()) , PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id }) => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class : * class , msg_id : * msg_id }) } } } } const fn max_u16 (a : u16 , b : u16) -> u16 { [a , b] [(a < b) as usize] } pub (crate) const MAX_PAYLOAD_LEN : u16 = max_u16 (Pack2 :: MAX_PAYLOAD_LEN , max_u16 (Pack1 :: MAX_PAYLOAD_LEN , 0u16)) ; # [cfg (feature = "serde")] pub struct PacketSerializer < 'a , T > { class : u8 , msg_id : u8 , msg : & 'a T , } # [cfg (feature = "serde")] impl < 'a , T : SerializeUbxPacketFields > serde :: Serialize for PacketSerializer < 'a , T > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; state . serialize_entry ("class" , & self . class) ? ; state . serialize_entry ("msg_id" , & self . msg_id) ? ; self . msg . serialize_fields (& mut state) ? ; state . end () } } # [cfg (feature = "serde")] impl serde :: Serialize for PacketRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { match * self { PacketRef :: Pack1 (ref msg) => PacketSerializer { class : Pack1 :: CLASS , msg_id : Pack1 :: ID , msg , } . serialize (serializer) , PacketRef :: Pack2 (ref msg) => PacketSerializer { class : Pack2 :: CLASS , msg_id : Pack2 :: ID , msg , } . serialize (serializer) , PacketRef :: Unknown (ref pack) => pack . serialize (serializer) , } } }
[INFO] [stdout] 
[INFO] [stdout] thread 'tests::test_define_recv_packets' (16) panicked at src/tests.rs:990:9:
[INFO] [stdout] assertion failed: `(left == right)`
[INFO] [stdout] 
[INFO] [stdout] [1mDiff[0m [31m< left[0m / [32mright >[0m :
[INFO] [stdout] [31m<# [doc = "All possible packets enum"] # [derive (Debug)] # [non_exhaustive] pub enum PacketRef < 'a > { Pack1 (Pack1Ref < 'a >) , Pack2 (Pack2Ref < 'a >) , Unknown (UnknownPacketRef < 'a >) [0m[1;48;5;52;31m, [0m[31m} # [doc = "All possible packets enum, owning the underlying data"] # [derive (Debug)] # [non_exhaustive] pub enum PacketOwned { Pack1 (Pack1Owned) , Pack2 (Pack2Owned) , Unknown (UnknownPacketOwned < { MAX_PAYLOAD_LEN as usize } >) [0m[1;48;5;52;31m, [0m[31m} impl < 'a > PacketRef < 'a > { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketRef :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketRef :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketRef :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } pub fn to_owned (& self) -> PacketOwned { self . into () } # [inline] pub fn payload_len (& self) -> usize { match * self { PacketRef :: Pack1 (ref packet) => packet . payload_len () , PacketRef :: Pack2 (ref packet) => packet . payload_len () , PacketRef :: Unknown (ref pack) => pack . payload . len () , } } } impl PacketOwned { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketOwned :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketOwned :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketOwned :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } } pub (crate) fn match_packet (class : u8 , msg_id : u8 , payload : & [u8][0m[1;48;5;52;31m ,[0m[31m) -> Result < PacketRef , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack1 (Pack1Ref (payload))) } [0m[1;48;5;52;31m, [0m[31m(Pack2 :: CLASS , Pack2 :: ID) if < Pack2Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack2 (Pack2Ref (payload))) } [0m[1;48;5;52;31m, [0m[31m_ => Ok (PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id [0m[1;48;5;52;31m, [0m[31m})) , } } pub (crate) fn match_packet_owned (class : u8 , msg_id : u8 , payload : & [u8][0m[1;48;5;52;31m ,[0m[31m) -> Result < PacketOwned , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack1Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack1 (Pack1Owned (bytes))) } [0m[1;48;5;52;31m, [0m[31m(Pack2 :: CLASS , Pack2 :: ID) if < Pack2Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack2Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack2 (Pack2Owned (bytes))) } [0m[1;48;5;52;31m, [0m[31m_ => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; Ok (PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class , msg_id [0m[1;48;5;52;31m, [0m[31m})) } [0m[1;48;5;52;31m, [0m[31m} } impl < 'a > From < & PacketRef < 'a >> for PacketOwned { fn from (packet : & PacketRef < 'a >) -> Self { match packet { PacketRef :: Pack1 (packet) => PacketOwned :: Pack1 (packet . into ()) , PacketRef :: Pack2 (packet) => PacketOwned :: Pack2 (packet . into ()) , PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id [0m[1;48;5;52;31m, [0m[31m}) => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class : * class , msg_id : * msg_id [0m[1;48;5;52;31m, [0m[31m}) } [0m[1;48;5;52;31m, [0m[31m} } } const fn max_u16 (a : u16 , b : u16) -> u16 { [a , b] [(a < b) as usize] } pub (crate) const MAX_PAYLOAD_LEN : u16 = max_u16 (Pack2 :: MAX_PAYLOAD_LEN , max_u16 (Pack1 :: MAX_PAYLOAD_LEN , 0u16)[0m[1;48;5;52;31m ,[0m[31m) ; # [cfg (feature = "serde")] pub struct PacketSerializer < 'a , T > { class : u8 , msg_id : u8 , msg : & 'a T , } # [cfg (feature = "serde")] impl < 'a , T : SerializeUbxPacketFields > serde :: Serialize for PacketSerializer < 'a , T > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; state . serialize_entry ("class" , & self . class) ? ; state . serialize_entry ("msg_id" , & self . msg_id) ? ; self . msg . serialize_fields (& mut state) ? ; state . end () } } # [cfg (feature = "serde")] impl serde :: Serialize for PacketRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { match * self { PacketRef :: Pack1 (ref msg) => PacketSerializer { class : Pack1 :: CLASS , msg_id : Pack1 :: ID , msg , } . serialize (serializer) , PacketRef :: Pack2 (ref msg) => PacketSerializer { class : Pack2 :: CLASS , msg_id : Pack2 :: ID , msg , } . serialize (serializer) , PacketRef :: Unknown (ref pack) => pack . serialize (serializer) , } } }[0m
[INFO] [stdout] [32m># [doc = "All possible packets enum"] # [derive (Debug)] # [non_exhaustive] pub enum PacketRef < 'a > { Pack1 (Pack1Ref < 'a >) , Pack2 (Pack2Ref < 'a >) , Unknown (UnknownPacketRef < 'a >) } # [doc = "All possible packets enum, owning the underlying data"] # [derive (Debug)] # [non_exhaustive] pub enum PacketOwned { Pack1 (Pack1Owned) , Pack2 (Pack2Owned) , Unknown (UnknownPacketOwned < { MAX_PAYLOAD_LEN as usize } >) } impl < 'a > PacketRef < 'a > { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketRef :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketRef :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketRef :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } pub fn to_owned (& self) -> PacketOwned { self . into () } # [inline] pub fn payload_len (& self) -> usize { match * self { PacketRef :: Pack1 (ref packet) => packet . payload_len () , PacketRef :: Pack2 (ref packet) => packet . payload_len () , PacketRef :: Unknown (ref pack) => pack . payload . len () , } } } impl PacketOwned { pub fn class_and_msg_id (& self) -> (u8 , u8) { match * self { PacketOwned :: Pack1 (_) => (Pack1 :: CLASS , Pack1 :: ID) , PacketOwned :: Pack2 (_) => (Pack2 :: CLASS , Pack2 :: ID) , PacketOwned :: Unknown (ref pack) => (pack . class , pack . msg_id) , } } } pub (crate) fn match_packet (class : u8 , msg_id : u8 , payload : & [u8]) -> Result < PacketRef , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack1 (Pack1Ref (payload))) } (Pack2 :: CLASS , Pack2 :: ID) if < Pack2Ref > :: validate (payload) . is_ok () => { Ok (PacketRef :: Pack2 (Pack2Ref (payload))) } _ => Ok (PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id })) , } } pub (crate) fn match_packet_owned (class : u8 , msg_id : u8 , payload : & [u8]) -> Result < PacketOwned , ParserError > { match (class , msg_id) { (Pack1 :: CLASS , Pack1 :: ID) if < Pack1Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack1Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack1 (Pack1Owned (bytes))) } (Pack2 :: CLASS , Pack2 :: ID) if < Pack2Owned > :: validate (payload) . is_ok () => { let mut bytes = [0u8 ; Pack2Owned :: PACKET_SIZE] ; bytes . clone_from_slice (payload) ; Ok (PacketOwned :: Pack2 (Pack2Owned (bytes))) } _ => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; Ok (PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class , msg_id })) } } } impl < 'a > From < & PacketRef < 'a >> for PacketOwned { fn from (packet : & PacketRef < 'a >) -> Self { match packet { PacketRef :: Pack1 (packet) => PacketOwned :: Pack1 (packet . into ()) , PacketRef :: Pack2 (packet) => PacketOwned :: Pack2 (packet . into ()) , PacketRef :: Unknown (UnknownPacketRef { payload , class , msg_id }) => { let mut payload_copy = [0u8 ; MAX_PAYLOAD_LEN as usize] ; let payload_len = core :: cmp :: min (payload . len () , MAX_PAYLOAD_LEN as usize) ; payload_copy [.. payload_len] . copy_from_slice (& payload [.. payload_len]) ; PacketOwned :: Unknown (UnknownPacketOwned { payload : payload_copy , payload_len , class : * class , msg_id : * msg_id }) } } } } const fn max_u16 (a : u16 , b : u16) -> u16 { [a , b] [(a < b) as usize] } pub (crate) const MAX_PAYLOAD_LEN : u16 = max_u16 (Pack2 :: MAX_PAYLOAD_LEN , max_u16 (Pack1 :: MAX_PAYLOAD_LEN , 0u16)) ; # [cfg (feature = "serde")] pub struct PacketSerializer < 'a , T > { class : u8 , msg_id : u8 , msg : & 'a T , } # [cfg (feature = "serde")] impl < 'a , T : SerializeUbxPacketFields > serde :: Serialize for PacketSerializer < 'a , T > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { let mut state = serializer . serialize_map (None) ? ; state . serialize_entry ("class" , & self . class) ? ; state . serialize_entry ("msg_id" , & self . msg_id) ? ; self . msg . serialize_fields (& mut state) ? ; state . end () } } # [cfg (feature = "serde")] impl serde :: Serialize for PacketRef < '_ > { fn serialize < S > (& self , serializer : S) -> Result < S :: Ok , S :: Error > where S : serde :: Serializer , { match * self { PacketRef :: Pack1 (ref msg) => PacketSerializer { class : Pack1 :: CLASS , msg_id : Pack1 :: ID , msg , } . serialize (serializer) , PacketRef :: Pack2 (ref msg) => PacketSerializer { class : Pack2 :: CLASS , msg_id : Pack2 :: ID , msg , } . serialize (serializer) , PacketRef :: Unknown (ref pack) => pack . serialize (serializer) , } } }[0m
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::libunwind::trace
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
[INFO] [stdout]    1:     0x7ea6e76dca12 - std[3b51380354919863]::backtrace_rs::backtrace::trace_unsynchronized::<std[3b51380354919863]::sys::backtrace::_print_fmt::{closure#1}>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
[INFO] [stdout]    2:     0x7ea6e76dca12 - std[3b51380354919863]::sys::backtrace::_print_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:74:9
[INFO] [stdout]    3:     0x7ea6e76dca12 - <<std[3b51380354919863]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[27de1724e4349be2]::fmt::Display>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:44:26
[INFO] [stdout]    4:     0x7ea6e771efca - <core[27de1724e4349be2]::fmt::rt::Argument>::fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/fmt/rt.rs:152:76
[INFO] [stdout]    5:     0x7ea6e771efca - core[27de1724e4349be2]::fmt::write
[INFO] [stdout]    6:     0x7ea6e76ee4a6 - std[3b51380354919863]::io::default_write_fmt::<alloc[a57f19327c0ad893]::vec::Vec<u8>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:639:11
[INFO] [stdout]    7:     0x7ea6e76ee4a6 - <alloc[a57f19327c0ad893]::vec::Vec<u8> as std[3b51380354919863]::io::Write>::write_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/io/mod.rs:1994:13
[INFO] [stdout]    8:     0x7ea6e76abf6f - <std[3b51380354919863]::sys::backtrace::BacktraceLock>::print
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:47:9
[INFO] [stdout]    9:     0x7ea6e76abf6f - std[3b51380354919863]::panicking::default_hook::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:292:27
[INFO] [stdout]   10:     0x7ea6e76ceaa9 - std[3b51380354919863]::panicking::default_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:316:9
[INFO] [stdout]   11:     0x6434eb58769e - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   12:     0x6434eb58769e - test[182b2e79ecd7bbd9]::test_main_with_exit_callback::<test[182b2e79ecd7bbd9]::test_main::{closure#0}>::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:145:21
[INFO] [stdout]   13:     0x7ea6e76ced12 - <alloc[a57f19327c0ad893]::boxed::Box<dyn for<'a, 'b> core[27de1724e4349be2]::ops::function::Fn<(&'a std[3b51380354919863]::panic::PanicHookInfo<'b>,), Output = ()> + core[27de1724e4349be2]::marker::Sync + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::Fn<(&std[3b51380354919863]::panic::PanicHookInfo,)>>::call
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2220:9
[INFO] [stdout]   14:     0x7ea6e76ced12 - std[3b51380354919863]::panicking::panic_with_hook
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:833:13
[INFO] [stdout]   15:     0x7ea6e76ac028 - std[3b51380354919863]::panicking::panic_handler::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:698:13
[INFO] [stdout]   16:     0x7ea6e76a0069 - std[3b51380354919863]::sys::backtrace::__rust_end_short_backtrace::<std[3b51380354919863]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:182:18
[INFO] [stdout]   17:     0x7ea6e76ad83d - __rustc[d79c0ace40940972]::rust_begin_unwind
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:689:5
[INFO] [stdout]   18:     0x7ea6e771f89c - core[27de1724e4349be2]::panicking::panic_fmt
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panicking.rs:80:14
[INFO] [stdout]   19:     0x6434eb4b2a78 - ublox_derive[d0b88179350b4dc5]::tests::run_compare_test
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:990:9
[INFO] [stdout]   20:     0x6434eb4c9a0d - ublox_derive[d0b88179350b4dc5]::tests::test_define_recv_packets
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:734:5
[INFO] [stdout]   21:     0x6434eb4b08c7 - ublox_derive[d0b88179350b4dc5]::tests::test_define_recv_packets::{closure#0}
[INFO] [stdout]                                at /opt/rustwide/workdir/src/tests.rs:721:30
[INFO] [stdout]   22:     0x6434eb547706 - <ublox_derive[d0b88179350b4dc5]::tests::test_define_recv_packets::{closure#0} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   23:     0x6434eb57ba4b - <fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   24:     0x6434eb57ba4b - test[182b2e79ecd7bbd9]::__rust_begin_short_backtrace::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, fn() -> core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:663:18
[INFO] [stdout]   25:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:74
[INFO] [stdout]   26:     0x6434eb5882aa - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   27:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   28:     0x6434eb5882aa - std[3b51380354919863]::panicking::catch_unwind::<core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>, core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   29:     0x6434eb5882aa - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<test[182b2e79ecd7bbd9]::run_test_in_process::{closure#0}>, core[27de1724e4349be2]::result::Result<(), alloc[a57f19327c0ad893]::string::String>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   30:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test_in_process
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:686:27
[INFO] [stdout]   31:     0x6434eb5882aa - test[182b2e79ecd7bbd9]::run_test::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:607:43
[INFO] [stdout]   32:     0x6434eb583854 - test[182b2e79ecd7bbd9]::run_test::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/test/src/lib.rs:637:41
[INFO] [stdout]   33:     0x6434eb583854 - std[3b51380354919863]::sys::backtrace::__rust_begin_short_backtrace::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/backtrace.rs:166:18
[INFO] [stdout]   34:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:91:13
[INFO] [stdout]   35:     0x6434eb58ada2 - <core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/panic/unwind_safe.rs:274:9
[INFO] [stdout]   36:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::do_call::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:581:40
[INFO] [stdout]   37:     0x6434eb58ada2 - std[3b51380354919863]::panicking::catch_unwind::<(), core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panicking.rs:544:19
[INFO] [stdout]   38:     0x6434eb58ada2 - std[3b51380354919863]::panic::catch_unwind::<core[27de1724e4349be2]::panic::unwind_safe::AssertUnwindSafe<std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}::{closure#0}>, ()>
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/panic.rs:359:14
[INFO] [stdout]   39:     0x6434eb58ada2 - std[3b51380354919863]::thread::lifecycle::spawn_unchecked::<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/thread/lifecycle.rs:89:26
[INFO] [stdout]   40:     0x6434eb58ada2 - <std[3b51380354919863]::thread::lifecycle::spawn_unchecked<test[182b2e79ecd7bbd9]::run_test::{closure#1}, ()>::{closure#1} as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/core/src/ops/function.rs:250:5
[INFO] [stdout]   41:     0x7ea6e76da0ff - <alloc[a57f19327c0ad893]::boxed::Box<dyn core[27de1724e4349be2]::ops::function::FnOnce<(), Output = ()> + core[27de1724e4349be2]::marker::Send> as core[27de1724e4349be2]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/alloc/src/boxed.rs:2206:9
[INFO] [stdout]   42:     0x7ea6e76da0ff - <std[3b51380354919863]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]                                at /rustc/0d162b25edd5bf0dba9a22e83b614f1113e90474/library/std/src/sys/thread/unix.rs:119:17
[INFO] [stdout]   43:     0x7ea6e744caa4 - <unknown>
[INFO] [stdout]   44:     0x7ea6e74d9a64 - clone
[INFO] [stdout]   45:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout]     tests::test_define_recv_packets
[INFO] [stdout]     tests::test_ubx_packet_recv_dyn_len
[INFO] [stdout]     tests::test_ubx_packet_recv_simple
[INFO] [stdout]     tests::test_ubx_packet_send
[INFO] [stdout] 
[INFO] [stdout] test result: FAILED. 2 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.23s
[INFO] [stdout] 
[INFO] [stderr] error: test failed, to rerun pass `--lib`
[INFO] running `Command { std: "docker" "inspect" "a717dd99321cec331a93f464958429619b945bbda396d064bfe14eac5cb7bf59", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "a717dd99321cec331a93f464958429619b945bbda396d064bfe14eac5cb7bf59", kill_on_drop: false }`
[INFO] [stdout] a717dd99321cec331a93f464958429619b945bbda396d064bfe14eac5cb7bf59
