diff --git a/Cargo.lock b/Cargo.lock index fdd5623..64da682 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -28,15 +28,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] @@ -63,9 +63,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.101" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "approx" @@ -94,7 +94,7 @@ version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "cexpr", "clang-sys", "itertools", @@ -116,9 +116,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "bitvec" @@ -143,9 +143,9 @@ dependencies = [ [[package]] name = "can-dbc" -version = "8.1.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912874d84099e530055bac10893f2d2b09c63bcf41c02e854e42ca42ec33ade1" +checksum = "981d5d67fc4c1d4822a3ff07095e69453099981d93eb4cd1d8ed9c5ec3549890" dependencies = [ "can-dbc-pest", "encoding_rs", @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.55" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "shlex", @@ -236,9 +236,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.57" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" dependencies = [ "clap_builder", "clap_derive", @@ -246,9 +246,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.57" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -258,9 +258,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" dependencies = [ "heck", "proc-macro2", @@ -270,15 +270,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.7" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "console" @@ -445,6 +445,12 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "funty" version = "2.0.0" @@ -463,14 +469,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.4" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "libc", "r-efi", "wasip2", + "wasip3", ] [[package]] @@ -479,6 +486,15 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + [[package]] name = "hashbrown" version = "0.16.1" @@ -491,6 +507,12 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "indexmap" version = "2.13.0" @@ -498,7 +520,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.16.1", + "serde", + "serde_core", ] [[package]] @@ -530,15 +554,21 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "leb128fmt" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.180" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libloading" @@ -552,9 +582,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "log" @@ -564,9 +594,9 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "minimal-lexical" @@ -601,9 +631,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "once_cell_polyfill" @@ -613,9 +643,9 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "pest" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" dependencies = [ "memchr", "ucd-trie", @@ -623,9 +653,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" dependencies = [ "pest", "pest_generator", @@ -633,9 +663,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" dependencies = [ "pest", "pest_meta", @@ -646,9 +676,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" dependencies = [ "pest", "sha2", @@ -697,18 +727,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" -version = "5.3.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "radium" @@ -727,9 +757,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -739,9 +769,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -750,9 +780,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustc-hash" @@ -762,11 +792,11 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys", @@ -782,6 +812,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -865,9 +901,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -888,9 +924,9 @@ checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" [[package]] name = "tempfile" -version = "3.24.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", "getrandom", @@ -910,9 +946,9 @@ dependencies = [ [[package]] name = "test_each_file" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de773517ee4367314c7918f6c9ef69c201ba72bfdbffb00234c22c50a153b73" +checksum = "44619e49a1f62888c271dc50533f036363a7936f99c7cb467ca9d45224cf83b3" dependencies = [ "proc-macro2", "quote", @@ -942,9 +978,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.11+spec-1.1.0" +version = "1.0.7+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" +checksum = "dd28d57d8a6f6e458bc0b8784f8fdcc4b99a437936056fa122cb234f18656a96" dependencies = [ "indexmap", "serde_core", @@ -957,33 +993,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.0.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "9b320e741db58cac564e26c607d3cc1fdc4a88fd36c879568c07856ed83ff3e9" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.0.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "7df25b4befd31c4816df190124375d5a20c6b6921e2cad937316de3fccd63420" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.0.7+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "f17aaa1c6e3dc22b1da4b6bba97d066e354c7945cac2f7852d4e4e7ca7a6b56d" [[package]] name = "trybuild" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f614c21bd3a61bad9501d75cbb7686f00386c806d7f456778432c25cf86948a" +checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e" dependencies = [ "glob", "serde", @@ -1028,9 +1064,15 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "utf8parse" @@ -1063,6 +1105,49 @@ dependencies = [ "wit-bindgen", ] +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "winapi-util" version = "0.1.11" @@ -1162,15 +1247,97 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.14" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8" [[package]] name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "wyz" @@ -1183,6 +1350,6 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.16" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index a3d4799..8038ba7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ std = [] [dependencies] anyhow = "1.0.101" -can-dbc = "8.0.1" +can-dbc = "9.0.0" embedded-can = "0.4.1" heck = "0.5.0" prettyplease = "0.2.37" diff --git a/src/lib.rs b/src/lib.rs index e5654e1..23440f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,7 @@ use typed_builder::TypedBuilder; pub use crate::feature_config::FeatureConfig; use crate::pad::PadAdapter; -use crate::signal_type::ValType; +use crate::signal_type::{IntSize, ValType}; use crate::utils::{ enum_name, enum_variant_name, multiplex_enum_name, multiplexed_enum_variant_name, multiplexed_enum_variant_wrapper_name, MessageExt as _, SignalExt as _, @@ -580,8 +580,8 @@ impl Config<'_> { writeln!(w, "/// - Value type: {:?}", signal.value_type)?; writeln!(w, "#[inline(always)]")?; let field = signal.field_name(); - let typ = ValType::from_signal(signal); - writeln!(w, "pub fn {field}_raw(&self) -> {typ} {{")?; + let signal_typ = ValType::from_signal(signal); + writeln!(w, "pub fn {field}_raw(&self) -> {signal_typ} {{")?; { let mut w = PadAdapter::wrap(w); signal_from_payload(&mut w, signal, msg).context("signal from payload")?; @@ -623,9 +623,14 @@ impl Config<'_> { multiplexed_enum_variant_name(msg, signal, *multiplexer_index)?, )?; } + let to_u16 = match signal_typ { + ValType::UnsignedInt(IntSize::Size8) => "multiplexor.into()", + ValType::UnsignedInt(IntSize::Size16) => "multiplexor", + _ => "u16::try_from(multiplexor).unwrap_or(u16::MAX)", + }; writeln!( w, - "multiplexor => Err(CanError::InvalidMultiplexor {{ message_id: {}::MESSAGE_ID, multiplexor: multiplexor.into() }}),", + "multiplexor => Err(CanError::InvalidMultiplexor {{ message_id: {}::MESSAGE_ID, multiplexor: {to_u16} }}),", msg.type_name(), )?; } diff --git a/src/signal_type.rs b/src/signal_type.rs index 60e87c8..684fc31 100644 --- a/src/signal_type.rs +++ b/src/signal_type.rs @@ -196,7 +196,7 @@ impl ValType { #[cfg(test)] mod tests { - use can_dbc::{Signal, ValueType}; + use can_dbc::{ByteOrder, MultiplexIndicator, NumericValue, Signal, ValueType}; use super::*; @@ -205,15 +205,15 @@ mod tests { name: String::new(), start_bit: 0, size: u64::from(signal_size), - byte_order: can_dbc::ByteOrder::LittleEndian, + byte_order: ByteOrder::LittleEndian, value_type: sign, factor: factor as f64, offset: offset as f64, - min: 0.0, - max: 0.0, + min: NumericValue::Double(0.0), + max: NumericValue::Double(0.0), unit: String::new(), receivers: vec![], - multiplexer_indicator: can_dbc::MultiplexIndicator::Plain, + multiplexer_indicator: MultiplexIndicator::Plain, } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.rs b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.rs index 023c66b..5a144cb 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.rs +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.rs @@ -122,7 +122,7 @@ impl ExtMuxCascaded { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxCascaded::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.stderr b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.stderr deleted file mode 100644 index a975b9e..0000000 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded.snap.rs:125:46 - | -125 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs index 5633703..8c0afea 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs @@ -125,7 +125,7 @@ impl ExtMuxCascaded { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxCascaded::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -207,7 +207,7 @@ impl ExtMuxCascaded { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxCascaded::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.stderr b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.stderr index 202df44..79e02d2 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.stderr +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.stderr @@ -101,37 +101,6 @@ error[E0592]: duplicate definitions with name `set_m1` 245 | pub fn set_m1(&mut self, value: ExtMuxCascadedMuxAM1) -> Result<(), CanError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `set_m1` -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs:128:46 - | -128 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtMuxCascadedMuxAIndex` --> tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs:195:21 | @@ -155,34 +124,3 @@ help: an enum with a similar name exists 202 - ExtMuxCascadedMuxAIndex::M1(ExtMuxCascadedMuxAM1 { 202 + ExtMuxCascadedMuxedA2MuxBIndex::M1(ExtMuxCascadedMuxAM1 { | - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_cascaded_dumped.snap.rs:210:46 - | -210 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs index 3d2625e..1ae96ce 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs @@ -134,7 +134,7 @@ impl ExtMuxIndepMultiplexors { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxIndepMultiplexors::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -235,7 +235,7 @@ impl ExtMuxIndepMultiplexors { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxIndepMultiplexors::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.stderr b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.stderr index 01fc511..588b8c5 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.stderr +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.stderr @@ -152,37 +152,6 @@ error[E0592]: duplicate definitions with name `set_m2` 291 | | ) -> Result<(), CanError> { | |_____________________________^ duplicate definitions for `set_m2` -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs:137:46 - | -137 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtMuxIndepMultiplexorsMuxAIndex` --> tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs:216:21 | @@ -218,34 +187,3 @@ help: an enum with a similar name exists 230 - ExtMuxIndepMultiplexorsMuxAIndex::M2(ExtMuxIndepMultiplexorsMuxAM2 { 230 + ExtMuxIndepMultiplexorsMuxBIndex::M2(ExtMuxIndepMultiplexorsMuxAM2 { | - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors.snap.rs:238:46 - | -238 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs index c722de5..1f71e88 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs @@ -134,7 +134,7 @@ impl ExtMuxIndepMultiplexors { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxIndepMultiplexors::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -235,7 +235,7 @@ impl ExtMuxIndepMultiplexors { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxIndepMultiplexors::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.stderr b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.stderr index 7bfe2a7..0e8e205 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.stderr +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.stderr @@ -152,37 +152,6 @@ error[E0592]: duplicate definitions with name `set_m2` 291 | | ) -> Result<(), CanError> { | |_____________________________^ duplicate definitions for `set_m2` -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs:137:46 - | -137 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtMuxIndepMultiplexorsMuxAIndex` --> tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs:216:21 | @@ -218,34 +187,3 @@ help: an enum with a similar name exists 230 - ExtMuxIndepMultiplexorsMuxAIndex::M2(ExtMuxIndepMultiplexorsMuxAM2 { 230 + ExtMuxIndepMultiplexorsMuxBIndex::M2(ExtMuxIndepMultiplexorsMuxAM2 { | - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_independent_multiplexors_dumped.snap.rs:238:46 - | -238 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.rs b/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.rs index b0ae8ab..44ff6eb 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.rs +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.rs @@ -127,7 +127,7 @@ impl ExtMuxMultipleValues { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxMultipleValues::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.stderr b/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.stderr deleted file mode 100644 index d3c2cc3..0000000 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values.snap.rs:130:46 - | -130 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.rs b/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.rs index 36feac0..73248df 100644 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.rs +++ b/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.rs @@ -127,7 +127,7 @@ impl ExtMuxMultipleValues { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtMuxMultipleValues::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.stderr b/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.stderr deleted file mode 100644 index e148838..0000000 --- a/tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/issue_184_extended_mux_multiple_values_dumped.snap.rs:130:46 - | -130 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/msxii_system_can.snap.rs b/tests-snapshots/dbc-cantools/msxii_system_can.snap.rs index 85728a4..348519e 100644 --- a/tests-snapshots/dbc-cantools/msxii_system_can.snap.rs +++ b/tests-snapshots/dbc-cantools/msxii_system_can.snap.rs @@ -496,7 +496,7 @@ impl BatteryVt { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: BatteryVt::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: multiplexor, }) } } diff --git a/tests-snapshots/dbc-cantools/multiplex_2.snap.rs b/tests-snapshots/dbc-cantools/multiplex_2.snap.rs index ccc3ec2..b7d63a4 100644 --- a/tests-snapshots/dbc-cantools/multiplex_2.snap.rs +++ b/tests-snapshots/dbc-cantools/multiplex_2.snap.rs @@ -115,7 +115,7 @@ impl Shared { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Shared::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -411,7 +411,7 @@ impl Normal { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Normal::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -721,7 +721,7 @@ impl Extended { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Extended::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -795,7 +795,7 @@ impl Extended { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Extended::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/multiplex_2.snap.stderr b/tests-snapshots/dbc-cantools/multiplex_2.snap.stderr index 384ef6c..553f554 100644 --- a/tests-snapshots/dbc-cantools/multiplex_2.snap.stderr +++ b/tests-snapshots/dbc-cantools/multiplex_2.snap.stderr @@ -150,99 +150,6 @@ error[E0592]: duplicate definitions with name `set_m2` 842 | pub fn set_m2(&mut self, value: ExtendedS0M2) -> Result<(), CanError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `set_m2` -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2.snap.rs:118:46 - | -118 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2.snap.rs:414:46 - | -414 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2.snap.rs:724:46 - | -724 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtendedS0Index` --> tests-snapshots/dbc-cantools/multiplex_2.snap.rs:792:21 | @@ -278,34 +185,3 @@ help: an enum with a similar name exists 794 - 2 => Ok(ExtendedS0Index::M2(ExtendedS0M2 { raw: self.raw })), 794 + 2 => Ok(ExtendedS6Index::M2(ExtendedS0M2 { raw: self.raw })), | - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2.snap.rs:798:46 - | -798 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs b/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs index f0ba95e..95dd701 100644 --- a/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs +++ b/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs @@ -115,7 +115,7 @@ impl Shared { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Shared::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -411,7 +411,7 @@ impl Normal { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Normal::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -722,7 +722,7 @@ impl Extended { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Extended::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -796,7 +796,7 @@ impl Extended { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Extended::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -870,7 +870,7 @@ impl Extended { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: Extended::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } @@ -1382,7 +1382,7 @@ impl ExtendedTypes { multiplexor => { Err(CanError::InvalidMultiplexor { message_id: ExtendedTypes::MESSAGE_ID, - multiplexor: multiplexor.into(), + multiplexor: u16::try_from(multiplexor).unwrap_or(u16::MAX), }) } } diff --git a/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.stderr b/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.stderr index fdd7814..5e3005f 100644 --- a/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.stderr +++ b/tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.stderr @@ -383,99 +383,6 @@ error[E0592]: duplicate definitions with name `set_m5` 1494 | pub fn set_m5(&mut self, value: ExtendedTypesS11M5) -> Result<(), CanError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `set_m5` -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:118:46 - | -118 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:414:46 - | -414 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:725:46 - | -725 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtendedS1Index` --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:793:21 | @@ -512,37 +419,6 @@ help: an enum with a similar name exists 795 + 2 => Ok(ExtendedS6Index::M2(ExtendedS1M2 { raw: self.raw })), | -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:799:46 - | -799 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtendedS0Index` --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:867:21 | @@ -579,68 +455,6 @@ help: an enum with a similar name exists 869 + 2 => Ok(ExtendedS6Index::M2(ExtendedS0M2 { raw: self.raw })), | -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:873:46 - | -873 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - -error[E0277]: the trait bound `u16: From` is not satisfied - --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:1385:46 - | -1385 | multiplexor: multiplexor.into(), - | ^^^^ the trait `From` is not implemented for `u16` - | -help: the following other types implement trait `From` - --> $RUST/core/src/ascii/ascii_char.rs - | - | impl const From for $ty { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `u16` implements `From` -... - | into_int_impl!(u8 u16 u32 u64 u128 char); - | ---------------------------------------- in this macro invocation - | - ::: $RUST/core/src/convert/num.rs - | - | impl const From<$Small> for $Large { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | `u16` implements `From` - | `u16` implements `From` -... - | impl_from!(bool => u16); - | ----------------------- in this macro invocation -... - | impl_from!(u8 => u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")]); - | -------------------------------------------------------------------------------- in this macro invocation - = note: required for `i8` to implement `Into` - = note: this error originates in the macro `into_int_impl` which comes from the expansion of the macro `impl_from` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0433]: failed to resolve: use of undeclared type `ExtendedTypesS11Index` --> tests-snapshots/dbc-cantools/multiplex_2_dumped.snap.rs:1445:21 | diff --git a/tests-snapshots/dbc-cantools/padding_bit_order.snap.rs b/tests-snapshots/dbc-cantools/padding_bit_order.snap.rs index 2a5ae93..6831d0c 100644 --- a/tests-snapshots/dbc-cantools/padding_bit_order.snap.rs +++ b/tests-snapshots/dbc-cantools/padding_bit_order.snap.rs @@ -729,7 +729,7 @@ impl Msg3 { StandardId::new_unchecked(0x4) }); pub const L_MIN: u64 = 0_u64; - pub const L_MAX: u64 = 18446744073709552000_u64; + pub const L_MAX: u64 = 18446744073709551615_u64; /// Construct new MSG3 from values pub fn new(l: u64) -> Result { let mut res = Self { raw: [0u8; 8] }; @@ -743,7 +743,7 @@ impl Msg3 { /// L /// /// - Min: 0 - /// - Max: 18446744073709552000 + /// - Max: 18446744073709551615 /// - Unit: "" /// - Receivers: E1 #[inline(always)] @@ -767,7 +767,7 @@ impl Msg3 { /// Set value of L #[inline(always)] pub fn set_l(&mut self, value: u64) -> Result<(), CanError> { - if value < 0_u64 || 18446744073709552000_u64 < value { + if value < 0_u64 || 18446744073709551615_u64 < value { return Err(CanError::ParameterOutOfRange { message_id: Msg3::MESSAGE_ID, }); @@ -844,7 +844,7 @@ impl Msg4 { StandardId::new_unchecked(0x5) }); pub const M_MIN: u64 = 0_u64; - pub const M_MAX: u64 = 18446744073709552000_u64; + pub const M_MAX: u64 = 18446744073709551615_u64; /// Construct new MSG4 from values pub fn new(m: u64) -> Result { let mut res = Self { raw: [0u8; 8] }; @@ -858,7 +858,7 @@ impl Msg4 { /// M /// /// - Min: 0 - /// - Max: 18446744073709552000 + /// - Max: 18446744073709551615 /// - Unit: "" /// - Receivers: E1 #[inline(always)] @@ -882,7 +882,7 @@ impl Msg4 { /// Set value of M #[inline(always)] pub fn set_m(&mut self, value: u64) -> Result<(), CanError> { - if value < 0_u64 || 18446744073709552000_u64 < value { + if value < 0_u64 || 18446744073709551615_u64 < value { return Err(CanError::ParameterOutOfRange { message_id: Msg4::MESSAGE_ID, }); diff --git a/tests-snapshots/dbc-cantools/padding_bit_order.snap.stderr b/tests-snapshots/dbc-cantools/padding_bit_order.snap.stderr deleted file mode 100644 index c9101cd..0000000 --- a/tests-snapshots/dbc-cantools/padding_bit_order.snap.stderr +++ /dev/null @@ -1,32 +0,0 @@ -error: literal out of range for `u64` - --> tests-snapshots/dbc-cantools/padding_bit_order.snap.rs:732:28 - | -732 | pub const L_MAX: u64 = 18446744073709552000_u64; - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the literal `18446744073709552000_u64` does not fit into the type `u64` whose range is `0..=18446744073709551615` - = note: `#[deny(overflowing_literals)]` on by default - -error: literal out of range for `u64` - --> tests-snapshots/dbc-cantools/padding_bit_order.snap.rs:770:29 - | -770 | if value < 0_u64 || 18446744073709552000_u64 < value { - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the literal `18446744073709552000_u64` does not fit into the type `u64` whose range is `0..=18446744073709551615` - -error: literal out of range for `u64` - --> tests-snapshots/dbc-cantools/padding_bit_order.snap.rs:847:28 - | -847 | pub const M_MAX: u64 = 18446744073709552000_u64; - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the literal `18446744073709552000_u64` does not fit into the type `u64` whose range is `0..=18446744073709551615` - -error: literal out of range for `u64` - --> tests-snapshots/dbc-cantools/padding_bit_order.snap.rs:885:29 - | -885 | if value < 0_u64 || 18446744073709552000_u64 < value { - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: the literal `18446744073709552000_u64` does not fit into the type `u64` whose range is `0..=18446744073709551615` diff --git a/tests/snapshots.rs b/tests/snapshots.rs index c192b7c..c0555cd 100644 --- a/tests/snapshots.rs +++ b/tests/snapshots.rs @@ -175,19 +175,15 @@ fn create_content(test: &Test, path: &Path) -> anyhow::Result { static BAD_TESTS: &[&str] = &[ // "empty_choice.snap.rs", - "issue_184_extended_mux_cascaded.snap.rs", "issue_184_extended_mux_cascaded_dumped.snap.rs", "issue_184_extended_mux_independent_multiplexors.snap.rs", "issue_184_extended_mux_independent_multiplexors_dumped.snap.rs", - "issue_184_extended_mux_multiple_values.snap.rs", - "issue_184_extended_mux_multiple_values_dumped.snap.rs", "issue_199.snap.rs", "issue_199_extended.snap.rs", "long_names_multiple_relations.snap.rs", "long_names_multiple_relations_dumped.snap.rs", "multiplex_2.snap.rs", "multiplex_2_dumped.snap.rs", - "padding_bit_order.snap.rs", "signed.snap.rs", // "FORD_CADS.snap.rs",