git.delta.rocks / jrsonnet / refs/commits / 7cd3ab4b3483

difftreelog

style fix clippy warnings

Yaroslav Bolyukin2024-08-26parent: #7cdcae3.patch.diff
in: master

19 files changed

modifiedCargo.lockdiffbeforeafterboth
4141
42[[package]]42[[package]]
43name = "anstream"43name = "anstream"
44version = "0.6.14"44version = "0.6.15"
45source = "registry+https://github.com/rust-lang/crates.io-index"45source = "registry+https://github.com/rust-lang/crates.io-index"
46checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"46checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
47dependencies = [47dependencies = [
48 "anstyle",48 "anstyle",
49 "anstyle-parse",49 "anstyle-parse",
5656
57[[package]]57[[package]]
58name = "anstyle"58name = "anstyle"
59version = "1.0.7"59version = "1.0.8"
60source = "registry+https://github.com/rust-lang/crates.io-index"60source = "registry+https://github.com/rust-lang/crates.io-index"
61checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"61checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
6262
63[[package]]63[[package]]
64name = "anstyle-parse"64name = "anstyle-parse"
65version = "0.2.4"65version = "0.2.5"
66source = "registry+https://github.com/rust-lang/crates.io-index"66source = "registry+https://github.com/rust-lang/crates.io-index"
67checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4"67checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
68dependencies = [68dependencies = [
69 "utf8parse",69 "utf8parse",
70]70]
7171
72[[package]]72[[package]]
73name = "anstyle-query"73name = "anstyle-query"
74version = "1.0.3"74version = "1.1.1"
75source = "registry+https://github.com/rust-lang/crates.io-index"75source = "registry+https://github.com/rust-lang/crates.io-index"
76checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5"76checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
77dependencies = [77dependencies = [
78 "windows-sys",78 "windows-sys 0.52.0",
79]79]
8080
81[[package]]81[[package]]
82name = "anstyle-wincon"82name = "anstyle-wincon"
83version = "3.0.3"83version = "3.0.4"
84source = "registry+https://github.com/rust-lang/crates.io-index"84source = "registry+https://github.com/rust-lang/crates.io-index"
85checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19"85checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
86dependencies = [86dependencies = [
87 "anstyle",87 "anstyle",
88 "windows-sys",88 "windows-sys 0.52.0",
89]89]
9090
91[[package]]91[[package]]
114114
115[[package]]115[[package]]
116name = "bitflags"116name = "bitflags"
117version = "2.5.0"117version = "2.6.0"
118source = "registry+https://github.com/rust-lang/crates.io-index"118source = "registry+https://github.com/rust-lang/crates.io-index"
119checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"119checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
120120
121[[package]]121[[package]]
122name = "block-buffer"122name = "block-buffer"
133source = "registry+https://github.com/rust-lang/crates.io-index"133source = "registry+https://github.com/rust-lang/crates.io-index"
134checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"134checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
135
136[[package]]
137name = "byteorder"
138version = "1.5.0"
139source = "registry+https://github.com/rust-lang/crates.io-index"
140checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
135141
136[[package]]142[[package]]
137name = "cc"143name = "cc"
138version = "1.0.97"144version = "1.1.14"
139source = "registry+https://github.com/rust-lang/crates.io-index"145source = "registry+https://github.com/rust-lang/crates.io-index"
140checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4"146checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932"
147dependencies = [
148 "shlex",
149]
141150
142[[package]]151[[package]]
143name = "cfg-if"152name = "cfg-if"
147156
148[[package]]157[[package]]
149name = "clap"158name = "clap"
150version = "4.5.4"159version = "4.5.16"
151source = "registry+https://github.com/rust-lang/crates.io-index"160source = "registry+https://github.com/rust-lang/crates.io-index"
152checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"161checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
153dependencies = [162dependencies = [
154 "clap_builder",163 "clap_builder",
155 "clap_derive",164 "clap_derive",
156]165]
157166
158[[package]]167[[package]]
159name = "clap_builder"168name = "clap_builder"
160version = "4.5.2"169version = "4.5.15"
161source = "registry+https://github.com/rust-lang/crates.io-index"170source = "registry+https://github.com/rust-lang/crates.io-index"
162checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"171checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6"
163dependencies = [172dependencies = [
164 "anstream",173 "anstream",
165 "anstyle",174 "anstyle",
169178
170[[package]]179[[package]]
171name = "clap_complete"180name = "clap_complete"
172version = "4.5.2"181version = "4.5.23"
173source = "registry+https://github.com/rust-lang/crates.io-index"182source = "registry+https://github.com/rust-lang/crates.io-index"
174checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e"183checksum = "531d7959c5bbb6e266cecdd0f20213639c3a5c3e4d615f97db87661745f781ff"
175dependencies = [184dependencies = [
176 "clap",185 "clap",
177]186]
178187
179[[package]]188[[package]]
180name = "clap_derive"189name = "clap_derive"
181version = "4.5.4"190version = "4.5.13"
182source = "registry+https://github.com/rust-lang/crates.io-index"191source = "registry+https://github.com/rust-lang/crates.io-index"
183checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64"192checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
184dependencies = [193dependencies = [
185 "heck",194 "heck",
186 "proc-macro2",195 "proc-macro2",
187 "quote",196 "quote",
188 "syn 2.0.64",197 "syn 2.0.76",
189]198]
190199
191[[package]]200[[package]]
192name = "clap_lex"201name = "clap_lex"
193version = "0.7.0"202version = "0.7.2"
194source = "registry+https://github.com/rust-lang/crates.io-index"203source = "registry+https://github.com/rust-lang/crates.io-index"
195checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"204checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
196205
197[[package]]206[[package]]
198name = "colorchoice"207name = "colorchoice"
199version = "1.0.1"208version = "1.0.2"
200source = "registry+https://github.com/rust-lang/crates.io-index"209source = "registry+https://github.com/rust-lang/crates.io-index"
201checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"210checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
202211
203[[package]]212[[package]]
204name = "console"213name = "console"
209 "encode_unicode",218 "encode_unicode",
210 "lazy_static",219 "lazy_static",
211 "libc",220 "libc",
212 "windows-sys",221 "windows-sys 0.52.0",
213]222]
214223
215[[package]]224[[package]]
220229
221[[package]]230[[package]]
222name = "cpufeatures"231name = "cpufeatures"
223version = "0.2.12"232version = "0.2.13"
224source = "registry+https://github.com/rust-lang/crates.io-index"233source = "registry+https://github.com/rust-lang/crates.io-index"
225checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"234checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad"
226dependencies = [235dependencies = [
227 "libc",236 "libc",
228]237]
272dependencies = [281dependencies = [
273 "anyhow",282 "anyhow",
274 "bumpalo",283 "bumpalo",
275 "indexmap 2.2.6",284 "indexmap 2.4.0",
276 "rustc-hash",285 "rustc-hash",
277 "serde",286 "serde",
278 "unicode-width",287 "unicode-width",
286295
287[[package]]296[[package]]
288name = "either"297name = "either"
289version = "1.12.0"298version = "1.13.0"
290source = "registry+https://github.com/rust-lang/crates.io-index"299source = "registry+https://github.com/rust-lang/crates.io-index"
291checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b"300checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
292301
293[[package]]302[[package]]
294name = "encode_unicode"303name = "encode_unicode"
309checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"318checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
310dependencies = [319dependencies = [
311 "libc",320 "libc",
312 "windows-sys",321 "windows-sys 0.52.0",
313]322]
314323
315[[package]]324[[package]]
316name = "fastrand"325name = "fastrand"
317version = "2.1.0"326version = "2.1.1"
318source = "registry+https://github.com/rust-lang/crates.io-index"327source = "registry+https://github.com/rust-lang/crates.io-index"
319checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"328checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
320329
321[[package]]330[[package]]
322name = "fnv"331name = "fnv"
392401
393[[package]]402[[package]]
394name = "indexmap"403name = "indexmap"
395version = "2.2.6"404version = "2.4.0"
396source = "registry+https://github.com/rust-lang/crates.io-index"405source = "registry+https://github.com/rust-lang/crates.io-index"
397checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"406checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
398dependencies = [407dependencies = [
399 "equivalent",408 "equivalent",
400 "hashbrown 0.14.5",409 "hashbrown 0.14.5",
421430
422[[package]]431[[package]]
423name = "is_terminal_polyfill"432name = "is_terminal_polyfill"
424version = "1.70.0"433version = "1.70.1"
425source = "registry+https://github.com/rust-lang/crates.io-index"434source = "registry+https://github.com/rust-lang/crates.io-index"
426checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"435checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
427436
428[[package]]437[[package]]
429name = "itertools"438name = "itertools"
524dependencies = [533dependencies = [
525 "proc-macro2",534 "proc-macro2",
526 "quote",535 "quote",
527 "syn 2.0.64",536 "syn 2.0.76",
528]537]
529538
530[[package]]539[[package]]
542dependencies = [551dependencies = [
543 "proc-macro2",552 "proc-macro2",
544 "quote",553 "quote",
545 "syn 2.0.64",554 "syn 2.0.76",
555 "syn-dissect-closure",
546]556]
547557
548[[package]]558[[package]]
620630
621[[package]]631[[package]]
622name = "lazy_static"632name = "lazy_static"
623version = "1.4.0"633version = "1.5.0"
624source = "registry+https://github.com/rust-lang/crates.io-index"634source = "registry+https://github.com/rust-lang/crates.io-index"
625checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"635checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
626636
627[[package]]637[[package]]
628name = "libc"638name = "libc"
629version = "0.2.155"639version = "0.2.158"
630source = "registry+https://github.com/rust-lang/crates.io-index"640source = "registry+https://github.com/rust-lang/crates.io-index"
631checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"641checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
632642
633[[package]]643[[package]]
634name = "libjsonnet"644name = "libjsonnet"
665675
666[[package]]676[[package]]
667name = "logos"677name = "logos"
668version = "0.14.0"678version = "0.14.1"
669source = "registry+https://github.com/rust-lang/crates.io-index"679source = "registry+https://github.com/rust-lang/crates.io-index"
670checksum = "161971eb88a0da7ae0c333e1063467c5b5727e7fb6b710b8db4814eade3a42e8"680checksum = "ff1ceb190eb9bdeecdd8f1ad6a71d6d632a50905948771718741b5461fb01e13"
671dependencies = [681dependencies = [
672 "logos-derive",682 "logos-derive",
673]683]
674684
675[[package]]685[[package]]
676name = "logos-codegen"686name = "logos-codegen"
677version = "0.14.0"687version = "0.14.1"
678source = "registry+https://github.com/rust-lang/crates.io-index"688source = "registry+https://github.com/rust-lang/crates.io-index"
679checksum = "8e31badd9de5131fdf4921f6473d457e3dd85b11b7f091ceb50e4df7c3eeb12a"689checksum = "90be66cb7bd40cb5cc2e9cfaf2d1133b04a3d93b72344267715010a466e0915a"
680dependencies = [690dependencies = [
681 "beef",691 "beef",
682 "fnv",692 "fnv",
683 "lazy_static",693 "lazy_static",
684 "proc-macro2",694 "proc-macro2",
685 "quote",695 "quote",
686 "regex-syntax",696 "regex-syntax",
687 "syn 2.0.64",697 "syn 2.0.76",
688]698]
689699
690[[package]]700[[package]]
691name = "logos-derive"701name = "logos-derive"
692version = "0.14.0"702version = "0.14.1"
693source = "registry+https://github.com/rust-lang/crates.io-index"703source = "registry+https://github.com/rust-lang/crates.io-index"
694checksum = "1c2a69b3eb68d5bd595107c9ee58d7e07fe2bb5e360cc85b0f084dedac80de0a"704checksum = "45154231e8e96586b39494029e58f12f8ffcb5ecf80333a603a13aa205ea8cbd"
695dependencies = [705dependencies = [
696 "logos-codegen",706 "logos-codegen",
697]707]
698708
699[[package]]709[[package]]
700name = "lru"710name = "lru"
701version = "0.12.3"711version = "0.12.4"
702source = "registry+https://github.com/rust-lang/crates.io-index"712source = "registry+https://github.com/rust-lang/crates.io-index"
703checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc"713checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904"
704dependencies = [714dependencies = [
705 "hashbrown 0.14.5",715 "hashbrown 0.14.5",
706]716]
713723
714[[package]]724[[package]]
715name = "memchr"725name = "memchr"
716version = "2.7.2"726version = "2.7.4"
717source = "registry+https://github.com/rust-lang/crates.io-index"727source = "registry+https://github.com/rust-lang/crates.io-index"
718checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"728checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
719
720[[package]]
721name = "memoffset"
722version = "0.9.1"
723source = "registry+https://github.com/rust-lang/crates.io-index"
724checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
725dependencies = [
726 "autocfg",
727]
728729
729[[package]]730[[package]]
730name = "mimalloc-sys"731name = "mimalloc-sys"
747748
748[[package]]749[[package]]
749name = "num-bigint"750name = "num-bigint"
750version = "0.4.5"751version = "0.4.6"
751source = "registry+https://github.com/rust-lang/crates.io-index"752source = "registry+https://github.com/rust-lang/crates.io-index"
752checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7"753checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
753dependencies = [754dependencies = [
754 "num-integer",755 "num-integer",
755 "num-traits",756 "num-traits",
811812
812[[package]]813[[package]]
813name = "peg"814name = "peg"
814version = "0.8.3"815version = "0.8.4"
815source = "registry+https://github.com/rust-lang/crates.io-index"816source = "registry+https://github.com/rust-lang/crates.io-index"
816checksum = "8a625d12ad770914cbf7eff6f9314c3ef803bfe364a1b20bc36ddf56673e71e5"817checksum = "295283b02df346d1ef66052a757869b2876ac29a6bb0ac3f5f7cd44aebe40e8f"
817dependencies = [818dependencies = [
818 "peg-macros",819 "peg-macros",
819 "peg-runtime",820 "peg-runtime",
820]821]
821822
822[[package]]823[[package]]
823name = "peg-macros"824name = "peg-macros"
824version = "0.8.3"825version = "0.8.4"
825source = "registry+https://github.com/rust-lang/crates.io-index"826source = "registry+https://github.com/rust-lang/crates.io-index"
826checksum = "f241d42067ed3ab6a4fece1db720838e1418f36d868585a27931f95d6bc03582"827checksum = "bdad6a1d9cf116a059582ce415d5f5566aabcd4008646779dab7fdc2a9a9d426"
827dependencies = [828dependencies = [
828 "peg-runtime",829 "peg-runtime",
829 "proc-macro2",830 "proc-macro2",
838839
839[[package]]840[[package]]
840name = "ppv-lite86"841name = "ppv-lite86"
841version = "0.2.17"842version = "0.2.20"
842source = "registry+https://github.com/rust-lang/crates.io-index"843source = "registry+https://github.com/rust-lang/crates.io-index"
843checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"844checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
845dependencies = [
846 "zerocopy",
847]
844848
845[[package]]849[[package]]
846name = "proc-macro2"850name = "proc-macro2"
847version = "1.0.82"851version = "1.0.86"
848source = "registry+https://github.com/rust-lang/crates.io-index"852source = "registry+https://github.com/rust-lang/crates.io-index"
849checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b"853checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
850dependencies = [854dependencies = [
851 "unicode-ident",855 "unicode-ident",
852]856]
862866
863[[package]]867[[package]]
864name = "quote"868name = "quote"
865version = "1.0.36"869version = "1.0.37"
866source = "registry+https://github.com/rust-lang/crates.io-index"870source = "registry+https://github.com/rust-lang/crates.io-index"
867checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"871checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
868dependencies = [872dependencies = [
869 "proc-macro2",873 "proc-macro2",
870]874]
919923
920[[package]]924[[package]]
921name = "redox_syscall"925name = "redox_syscall"
922version = "0.5.1"926version = "0.5.3"
923source = "registry+https://github.com/rust-lang/crates.io-index"927source = "registry+https://github.com/rust-lang/crates.io-index"
924checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"928checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
925dependencies = [929dependencies = [
926 "bitflags",930 "bitflags",
927]931]
928932
929[[package]]933[[package]]
930name = "regex"934name = "regex"
931version = "1.10.4"935version = "1.10.6"
932source = "registry+https://github.com/rust-lang/crates.io-index"936source = "registry+https://github.com/rust-lang/crates.io-index"
933checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"937checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
934dependencies = [938dependencies = [
935 "aho-corasick",939 "aho-corasick",
936 "memchr",940 "memchr",
940944
941[[package]]945[[package]]
942name = "regex-automata"946name = "regex-automata"
943version = "0.4.6"947version = "0.4.7"
944source = "registry+https://github.com/rust-lang/crates.io-index"948source = "registry+https://github.com/rust-lang/crates.io-index"
945checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"949checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
946dependencies = [950dependencies = [
947 "aho-corasick",951 "aho-corasick",
948 "memchr",952 "memchr",
951955
952[[package]]956[[package]]
953name = "regex-syntax"957name = "regex-syntax"
954version = "0.8.3"958version = "0.8.4"
955source = "registry+https://github.com/rust-lang/crates.io-index"959source = "registry+https://github.com/rust-lang/crates.io-index"
956checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"960checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
957961
958[[package]]962[[package]]
959name = "rowan"963name = "rowan"
960version = "0.15.15"964version = "0.15.16"
961source = "registry+https://github.com/rust-lang/crates.io-index"965source = "registry+https://github.com/rust-lang/crates.io-index"
962checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49"966checksum = "0a542b0253fa46e632d27a1dc5cf7b930de4df8659dc6e720b647fc72147ae3d"
963dependencies = [967dependencies = [
964 "countme",968 "countme",
965 "hashbrown 0.14.5",969 "hashbrown 0.14.5",
966 "memoffset",
967 "rustc-hash",970 "rustc-hash",
968 "text-size",971 "text-size",
969]972]
984 "errno",987 "errno",
985 "libc",988 "libc",
986 "linux-raw-sys",989 "linux-raw-sys",
987 "windows-sys",990 "windows-sys 0.52.0",
988]991]
989992
990[[package]]993[[package]]
10011004
1002[[package]]1005[[package]]
1003name = "serde"1006name = "serde"
1004version = "1.0.202"1007version = "1.0.209"
1005source = "registry+https://github.com/rust-lang/crates.io-index"1008source = "registry+https://github.com/rust-lang/crates.io-index"
1006checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"1009checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
1007dependencies = [1010dependencies = [
1008 "serde_derive",1011 "serde_derive",
1009]1012]
10101013
1011[[package]]1014[[package]]
1012name = "serde_derive"1015name = "serde_derive"
1013version = "1.0.202"1016version = "1.0.209"
1014source = "registry+https://github.com/rust-lang/crates.io-index"1017source = "registry+https://github.com/rust-lang/crates.io-index"
1015checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"1018checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
1016dependencies = [1019dependencies = [
1017 "proc-macro2",1020 "proc-macro2",
1018 "quote",1021 "quote",
1019 "syn 2.0.64",1022 "syn 2.0.76",
1020]1023]
10211024
1022[[package]]1025[[package]]
1023name = "serde_json"1026name = "serde_json"
1024version = "1.0.117"1027version = "1.0.127"
1025source = "registry+https://github.com/rust-lang/crates.io-index"1028source = "registry+https://github.com/rust-lang/crates.io-index"
1026checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"1029checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
1027dependencies = [1030dependencies = [
1028 "itoa",1031 "itoa",
1032 "memchr",
1029 "ryu",1033 "ryu",
1030 "serde",1034 "serde",
1031]1035]
1074 "keccak",1078 "keccak",
1075]1079]
1080
1081[[package]]
1082name = "shlex"
1083version = "1.3.0"
1084source = "registry+https://github.com/rust-lang/crates.io-index"
1085checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
10761086
1077[[package]]1087[[package]]
1078name = "similar"1088name = "similar"
1079version = "2.5.0"1089version = "2.6.0"
1080source = "registry+https://github.com/rust-lang/crates.io-index"1090source = "registry+https://github.com/rust-lang/crates.io-index"
1081checksum = "fa42c91313f1d05da9b26f267f931cf178d4aba455b4c4622dd7355eb80c6640"1091checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
10821092
1083[[package]]1093[[package]]
1084name = "smallvec"1094name = "smallvec"
10881098
1089[[package]]1099[[package]]
1090name = "stacker"1100name = "stacker"
1091version = "0.1.15"1101version = "0.1.16"
1092source = "registry+https://github.com/rust-lang/crates.io-index"1102source = "registry+https://github.com/rust-lang/crates.io-index"
1093checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce"1103checksum = "95a5daa25ea337c85ed954c0496e3bdd2c7308cc3b24cf7b50d04876654c579f"
1094dependencies = [1104dependencies = [
1095 "cc",1105 "cc",
1096 "cfg-if",1106 "cfg-if",
1097 "libc",1107 "libc",
1098 "psm",1108 "psm",
1099 "winapi",1109 "windows-sys 0.36.1",
1100]1110]
11011111
1102[[package]]1112[[package]]
11241134
1125[[package]]1135[[package]]
1126name = "syn"1136name = "syn"
1127version = "2.0.64"1137version = "2.0.76"
1128source = "registry+https://github.com/rust-lang/crates.io-index"1138source = "registry+https://github.com/rust-lang/crates.io-index"
1129checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f"1139checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525"
1130dependencies = [1140dependencies = [
1131 "proc-macro2",1141 "proc-macro2",
1132 "quote",1142 "quote",
1133 "unicode-ident",1143 "unicode-ident",
1134]1144]
1145
1146[[package]]
1147name = "syn-dissect-closure"
1148version = "0.1.0"
1149source = "registry+https://github.com/rust-lang/crates.io-index"
1150checksum = "343bae741672e4b94421cbe93f9794ba9a061434272f7e3a29ff43be26be3ac9"
1151dependencies = [
1152 "proc-macro2",
1153 "quote",
1154 "syn 2.0.76",
1155]
11351156
1136[[package]]1157[[package]]
1137name = "tempfile"1158name = "tempfile"
1138version = "3.10.1"1159version = "3.12.0"
1139source = "registry+https://github.com/rust-lang/crates.io-index"1160source = "registry+https://github.com/rust-lang/crates.io-index"
1140checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"1161checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64"
1141dependencies = [1162dependencies = [
1142 "cfg-if",1163 "cfg-if",
1143 "fastrand",1164 "fastrand",
1165 "once_cell",
1144 "rustix",1166 "rustix",
1145 "windows-sys",1167 "windows-sys 0.59.0",
1146]1168]
11471169
1148[[package]]1170[[package]]
11651187
1166[[package]]1188[[package]]
1167name = "thiserror"1189name = "thiserror"
1168version = "1.0.61"1190version = "1.0.63"
1169source = "registry+https://github.com/rust-lang/crates.io-index"1191source = "registry+https://github.com/rust-lang/crates.io-index"
1170checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"1192checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
1171dependencies = [1193dependencies = [
1172 "thiserror-impl",1194 "thiserror-impl",
1173]1195]
11741196
1175[[package]]1197[[package]]
1176name = "thiserror-impl"1198name = "thiserror-impl"
1177version = "1.0.61"1199version = "1.0.63"
1178source = "registry+https://github.com/rust-lang/crates.io-index"1200source = "registry+https://github.com/rust-lang/crates.io-index"
1179checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"1201checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
1180dependencies = [1202dependencies = [
1181 "proc-macro2",1203 "proc-macro2",
1182 "quote",1204 "quote",
1183 "syn 2.0.64",1205 "syn 2.0.76",
1184]1206]
11851207
1186[[package]]1208[[package]]
12031225
1204[[package]]1226[[package]]
1205name = "unicode-width"1227name = "unicode-width"
1206version = "0.1.12"1228version = "0.1.13"
1207source = "registry+https://github.com/rust-lang/crates.io-index"1229source = "registry+https://github.com/rust-lang/crates.io-index"
1208checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6"1230checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
12091231
1210[[package]]1232[[package]]
1211name = "utf8parse"1233name = "utf8parse"
1212version = "0.2.1"1234version = "0.2.2"
1213source = "registry+https://github.com/rust-lang/crates.io-index"1235source = "registry+https://github.com/rust-lang/crates.io-index"
1214checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"1236checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
12151237
1216[[package]]1238[[package]]
1217name = "version_check"1239name = "version_check"
1218version = "0.9.4"1240version = "0.9.5"
1219source = "registry+https://github.com/rust-lang/crates.io-index"1241source = "registry+https://github.com/rust-lang/crates.io-index"
1220checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"1242checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
12211243
1222[[package]]1244[[package]]
1223name = "wasi"1245name = "wasi"
1226checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"1248checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
12271249
1228[[package]]1250[[package]]
1229name = "winapi"1251name = "windows-sys"
1230version = "0.3.9"1252version = "0.36.1"
1231source = "registry+https://github.com/rust-lang/crates.io-index"1253source = "registry+https://github.com/rust-lang/crates.io-index"
1232checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"1254checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
1233dependencies = [1255dependencies = [
1256 "windows_aarch64_msvc 0.36.1",
1234 "winapi-i686-pc-windows-gnu",1257 "windows_i686_gnu 0.36.1",
1258 "windows_i686_msvc 0.36.1",
1235 "winapi-x86_64-pc-windows-gnu",1259 "windows_x86_64_gnu 0.36.1",
1260 "windows_x86_64_msvc 0.36.1",
1236]1261]
1237
1238[[package]]
1239name = "winapi-i686-pc-windows-gnu"
1240version = "0.4.0"
1241source = "registry+https://github.com/rust-lang/crates.io-index"
1242checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1243
1244[[package]]
1245name = "winapi-x86_64-pc-windows-gnu"
1246version = "0.4.0"
1247source = "registry+https://github.com/rust-lang/crates.io-index"
1248checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
12491262
1250[[package]]1263[[package]]
1251name = "windows-sys"1264name = "windows-sys"
1256 "windows-targets",1269 "windows-targets",
1257]1270]
1271
1272[[package]]
1273name = "windows-sys"
1274version = "0.59.0"
1275source = "registry+https://github.com/rust-lang/crates.io-index"
1276checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
1277dependencies = [
1278 "windows-targets",
1279]
12581280
1259[[package]]1281[[package]]
1260name = "windows-targets"1282name = "windows-targets"
1261version = "0.52.5"1283version = "0.52.6"
1262source = "registry+https://github.com/rust-lang/crates.io-index"1284source = "registry+https://github.com/rust-lang/crates.io-index"
1263checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"1285checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
1264dependencies = [1286dependencies = [
1265 "windows_aarch64_gnullvm",1287 "windows_aarch64_gnullvm",
1266 "windows_aarch64_msvc",1288 "windows_aarch64_msvc 0.52.6",
1267 "windows_i686_gnu",1289 "windows_i686_gnu 0.52.6",
1268 "windows_i686_gnullvm",1290 "windows_i686_gnullvm",
1269 "windows_i686_msvc",1291 "windows_i686_msvc 0.52.6",
1270 "windows_x86_64_gnu",1292 "windows_x86_64_gnu 0.52.6",
1271 "windows_x86_64_gnullvm",1293 "windows_x86_64_gnullvm",
1272 "windows_x86_64_msvc",1294 "windows_x86_64_msvc 0.52.6",
1273]1295]
12741296
1275[[package]]1297[[package]]
1276name = "windows_aarch64_gnullvm"1298name = "windows_aarch64_gnullvm"
1277version = "0.52.5"1299version = "0.52.6"
1278source = "registry+https://github.com/rust-lang/crates.io-index"1300source = "registry+https://github.com/rust-lang/crates.io-index"
1279checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"1301checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
1302
1303[[package]]
1304name = "windows_aarch64_msvc"
1305version = "0.36.1"
1306source = "registry+https://github.com/rust-lang/crates.io-index"
1307checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
12801308
1281[[package]]1309[[package]]
1282name = "windows_aarch64_msvc"1310name = "windows_aarch64_msvc"
1283version = "0.52.5"1311version = "0.52.6"
1284source = "registry+https://github.com/rust-lang/crates.io-index"1312source = "registry+https://github.com/rust-lang/crates.io-index"
1285checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"1313checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
1314
1315[[package]]
1316name = "windows_i686_gnu"
1317version = "0.36.1"
1318source = "registry+https://github.com/rust-lang/crates.io-index"
1319checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
12861320
1287[[package]]1321[[package]]
1288name = "windows_i686_gnu"1322name = "windows_i686_gnu"
1289version = "0.52.5"1323version = "0.52.6"
1290source = "registry+https://github.com/rust-lang/crates.io-index"1324source = "registry+https://github.com/rust-lang/crates.io-index"
1291checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"1325checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
12921326
1293[[package]]1327[[package]]
1294name = "windows_i686_gnullvm"1328name = "windows_i686_gnullvm"
1295version = "0.52.5"1329version = "0.52.6"
1296source = "registry+https://github.com/rust-lang/crates.io-index"1330source = "registry+https://github.com/rust-lang/crates.io-index"
1297checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"1331checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
1332
1333[[package]]
1334name = "windows_i686_msvc"
1335version = "0.36.1"
1336source = "registry+https://github.com/rust-lang/crates.io-index"
1337checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
12981338
1299[[package]]1339[[package]]
1300name = "windows_i686_msvc"1340name = "windows_i686_msvc"
1301version = "0.52.5"1341version = "0.52.6"
1302source = "registry+https://github.com/rust-lang/crates.io-index"1342source = "registry+https://github.com/rust-lang/crates.io-index"
1303checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"1343checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
1344
1345[[package]]
1346name = "windows_x86_64_gnu"
1347version = "0.36.1"
1348source = "registry+https://github.com/rust-lang/crates.io-index"
1349checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
13041350
1305[[package]]1351[[package]]
1306name = "windows_x86_64_gnu"1352name = "windows_x86_64_gnu"
1307version = "0.52.5"1353version = "0.52.6"
1308source = "registry+https://github.com/rust-lang/crates.io-index"1354source = "registry+https://github.com/rust-lang/crates.io-index"
1309checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"1355checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
13101356
1311[[package]]1357[[package]]
1312name = "windows_x86_64_gnullvm"1358name = "windows_x86_64_gnullvm"
1313version = "0.52.5"1359version = "0.52.6"
1314source = "registry+https://github.com/rust-lang/crates.io-index"1360source = "registry+https://github.com/rust-lang/crates.io-index"
1315checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"1361checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
1362
1363[[package]]
1364name = "windows_x86_64_msvc"
1365version = "0.36.1"
1366source = "registry+https://github.com/rust-lang/crates.io-index"
1367checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
13161368
1317[[package]]1369[[package]]
1318name = "windows_x86_64_msvc"1370name = "windows_x86_64_msvc"
1319version = "0.52.5"1371version = "0.52.6"
1320source = "registry+https://github.com/rust-lang/crates.io-index"1372source = "registry+https://github.com/rust-lang/crates.io-index"
1321checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"1373checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
13221374
1323[[package]]1375[[package]]
1324name = "xshell"1376name = "xshell"
1341dependencies = [1393dependencies = [
1342 "anyhow",1394 "anyhow",
1343 "clap",1395 "clap",
1344 "indexmap 2.2.6",1396 "indexmap 2.4.0",
1345 "itertools",1397 "itertools",
1346 "proc-macro2",1398 "proc-macro2",
1347 "quote",1399 "quote",
13601412
1361[[package]]1413[[package]]
1362name = "zerocopy"1414name = "zerocopy"
1363version = "0.7.34"1415version = "0.7.35"
1364source = "registry+https://github.com/rust-lang/crates.io-index"1416source = "registry+https://github.com/rust-lang/crates.io-index"
1365checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087"1417checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
1366dependencies = [1418dependencies = [
1419 "byteorder",
1367 "zerocopy-derive",1420 "zerocopy-derive",
1368]1421]
13691422
1370[[package]]1423[[package]]
1371name = "zerocopy-derive"1424name = "zerocopy-derive"
1372version = "0.7.34"1425version = "0.7.35"
1373source = "registry+https://github.com/rust-lang/crates.io-index"1426source = "registry+https://github.com/rust-lang/crates.io-index"
1374checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"1427checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
1375dependencies = [1428dependencies = [
1376 "proc-macro2",1429 "proc-macro2",
1377 "quote",1430 "quote",
1378 "syn 2.0.64",1431 "syn 2.0.76",
1379]1432]
13801433
modifiedCargo.tomldiffbeforeafterboth
89lru = "0.12.3"89lru = "0.12.3"
9090
91json-structural-diff = "0.1.0"91json-structural-diff = "0.1.0"
92syn-dissect-closure = "0.1.0"
9293
93[workspace.lints.rust]94[workspace.lints.rust]
94unsafe_op_in_unsafe_fn = "deny"95unsafe_op_in_unsafe_fn = "deny"
107all = "warn"108all = "warn"
108109
109[workspace.lints.clippy]110[workspace.lints.clippy]
110all = "warn"111all = { level = "warn", priority = -1 }
111nursery = "warn"112nursery = { level = "warn", priority = -1 }
112pedantic = "warn"113pedantic = { level = "warn", priority = -1 }
113114
114ptr_arg = "allow"115ptr_arg = "allow"
115# Too verbose116# Too verbose
modifiedbindings/jsonnet/src/native.rsdiffbeforeafterboth
20/// - `ctx` User pointer, given in `jsonnet_native_callback`.20/// - `ctx` User pointer, given in `jsonnet_native_callback`.
21/// - `argv` Array of arguments from Jsonnet code.21/// - `argv` Array of arguments from Jsonnet code.
22/// - `param` success Set this byref param to 1 to indicate success and 0 for failure.22/// - `param` success Set this byref param to 1 to indicate success and 0 for failure.
23///
23/// Returns the content of the imported file, or an error message.24/// Returns the content of the imported file, or an error message.
24type JsonnetNativeCallback = unsafe extern "C" fn(25type JsonnetNativeCallback = unsafe extern "C" fn(
25 ctx: *const c_void,26 ctx: *const c_void,
modifiedcmds/jrsonnet-fmt/src/comments.rsdiffbeforeafterboth
20 let Ok(c) = c else {20 let Ok(c) = c else {
21 let mut text = c.as_ref().unwrap_err() as &str;21 let mut text = c.as_ref().unwrap_err() as &str;
22 while !text.is_empty() {22 while !text.is_empty() {
23 let pos = text.find(|c| c == '\n' || c == '\t').unwrap_or(text.len());23 let pos = text.find(['\n', '\t']).unwrap_or(text.len());
24 let sliced = &text[..pos];24 let sliced = &text[..pos];
25 p!(out, string(sliced.to_string()));25 p!(out, string(sliced.to_string()));
26 text = &text[pos..];26 text = &text[pos..];
modifiedcmds/jrsonnet-fmt/src/tests.rsdiffbeforeafterboth
75 b: '',75 b: '',
76 },76 },
77 }"77 }"
78 )))78 )));
79}79}
8080
modifiedcrates/jrsonnet-evaluator/src/function/arglike.rsdiffbeforeafterboth
91 handler: &mut dyn FnMut(&IStr, Thunk<Val>) -> Result<()>,91 handler: &mut dyn FnMut(&IStr, Thunk<Val>) -> Result<()>,
92 ) -> Result<()>;92 ) -> Result<()>;
93 fn named_names(&self, handler: &mut dyn FnMut(&IStr));93 fn named_names(&self, handler: &mut dyn FnMut(&IStr));
94 fn is_empty(&self) -> bool;
94}95}
9596
96impl ArgsLike for Vec<Val> {97impl ArgsLike for Vec<Val> {
117 Ok(())118 Ok(())
118 }119 }
119 fn named_names(&self, _handler: &mut dyn FnMut(&IStr)) {}120 fn named_names(&self, _handler: &mut dyn FnMut(&IStr)) {}
121 fn is_empty(&self) -> bool {
122 self.is_empty()
123 }
120}124}
121125
122impl ArgsLike for ArgsDesc {126impl ArgsLike for ArgsDesc {
174 }178 }
175 }179 }
180
181 fn is_empty(&self) -> bool {
182 self.unnamed.is_empty() && self.named.is_empty()
183 }
176}184}
177185
178impl<V: ArgLike, S> ArgsLike for HashMap<IStr, V, S> {186impl<V: ArgLike, S> ArgsLike for HashMap<IStr, V, S> {
207 }215 }
208 }216 }
217
218 fn is_empty(&self) -> bool {
219 self.is_empty()
220 }
209}221}
210impl<V, S> OptionalContext for HashMap<IStr, V, S> where V: ArgLike + OptionalContext {}222impl<V, S> OptionalContext for HashMap<IStr, V, S> where V: ArgLike + OptionalContext {}
211223
236 self.0.named_names(handler);248 self.0.named_names(handler);
237 }249 }
250
251 fn is_empty(&self) -> bool {
252 self.0.is_empty()
253 }
238}254}
239255
240macro_rules! impl_args_like {256macro_rules! impl_args_like {
241 ($count:expr; $($gen:ident)*) => {257 ($count:expr; $($gen:ident)*) => {
242 impl<$($gen: ArgLike,)*> ArgsLike for ($($gen,)*) {258 impl<$($gen: ArgLike,)*> ArgsLike for ($($gen,)*) {
243 fn unnamed_len(&self) -> usize {259 fn unnamed_len(&self) -> usize {
244 $count260 $count
245 }261 }
267 Ok(())283 Ok(())
268 }284 }
269 fn named_names(&self, _handler: &mut dyn FnMut(&IStr)) {}285 fn named_names(&self, _handler: &mut dyn FnMut(&IStr)) {}
270 }286
271 impl<$($gen: ArgLike,)*> OptionalContext for ($($gen,)*) where $($gen: OptionalContext),* {}
272
273 impl<$($gen: ArgLike,)*> ArgsLike for ($((IStr, $gen),)*) {
274 fn unnamed_len(&self) -> usize {287 fn is_empty(&self) -> bool {
275 0288 // impl_args_like only implements non-empty tuples.
276 }289 false
277 fn unnamed_iter(
278 &self,
279 _ctx: Context,
280 _tailstrict: bool,
281 _handler: &mut dyn FnMut(usize, Thunk<Val>) -> Result<()>,
282 ) -> Result<()> {
283 Ok(())
284 }290 }
285 #[allow(non_snake_case)]291 }
286 fn named_iter(
287 &self,
288 ctx: Context,
289 tailstrict: bool,
290 handler: &mut dyn FnMut(&IStr, Thunk<Val>) -> Result<()>,
291 ) -> Result<()> {
292 let ($($gen,)*) = self;
293 $(
294 handler(&$gen.0, $gen.1.evaluate_arg(ctx.clone(), tailstrict)?)?;
295 )*
296 Ok(())
297 }
298 #[allow(non_snake_case)]
299 fn named_names(&self, handler: &mut dyn FnMut(&IStr)) {
300 let ($($gen,)*) = self;
301 $(
302 handler(&$gen.0);
303 )*
304 }
305 }
306 impl<$($gen: ArgLike,)*> OptionalContext for ($((IStr, $gen),)*) where $($gen: OptionalContext),* {}292 impl<$($gen: ArgLike,)*> OptionalContext for ($($gen,)*) where $($gen: OptionalContext),* {}
307 };293 };
308 ($count:expr; $($cur:ident)* @ $c:ident $($rest:ident)*) => {294 ($count:expr; $($cur:ident)* @ $c:ident $($rest:ident)*) => {
309 impl_args_like!($count; $($cur)*);295 impl_args_like!($count; $($cur)*);
342 }328 }
343329
344 fn named_names(&self, _handler: &mut dyn FnMut(&IStr)) {}330 fn named_names(&self, _handler: &mut dyn FnMut(&IStr)) {}
331 fn is_empty(&self) -> bool {
332 true
333 }
345}334}
346impl OptionalContext for () {}335impl OptionalContext for () {}
347336
modifiedcrates/jrsonnet-evaluator/src/function/mod.rsdiffbeforeafterboth
13 parse::{parse_default_function_call, parse_function_call},13 parse::{parse_default_function_call, parse_function_call},
14};14};
15use crate::{evaluate, evaluate_trivial, gc::TraceBox, tb, Context, ContextBuilder, Result, Val};15use crate::{
16 bail, error::ErrorKind::*, evaluate, evaluate_trivial, gc::TraceBox, tb, Context,
17 ContextBuilder, Result, Thunk, Val,
18};
1619
17pub mod arglike;20pub mod arglike;
94 Id,97 Id,
95 /// Plain function implemented in jsonnet.98 /// Plain function implemented in jsonnet.
96 Normal(Cc<FuncDesc>),99 Normal(Cc<FuncDesc>),
100 /// Function without arguments works just as a fancy thunk value.
101 Thunk(Thunk<Val>),
97 /// Standard library function.102 /// Standard library function.
98 StaticBuiltin(#[trace(skip)] &'static dyn StaticBuiltin),103 StaticBuiltin(#[trace(skip)] &'static dyn StaticBuiltin),
99 /// User-provided function.104 /// User-provided function.
104 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {109 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
105 match self {110 match self {
106 Self::Id => f.debug_tuple("Id").finish(),111 Self::Id => f.debug_tuple("Id").finish(),
112 Self::Thunk(arg0) => f.debug_tuple("Thunk").field(arg0).finish(),
107 Self::Normal(arg0) => f.debug_tuple("Normal").field(arg0).finish(),113 Self::Normal(arg0) => f.debug_tuple("Normal").field(arg0).finish(),
108 Self::StaticBuiltin(arg0) => {114 Self::StaticBuiltin(arg0) => {
109 f.debug_tuple("StaticBuiltin").field(&arg0.name()).finish()115 f.debug_tuple("StaticBuiltin").field(&arg0.name()).finish()
146 )152 )
147 })153 })
148 .collect(),154 .collect(),
155 Self::Thunk(_) => vec![],
149 }156 }
150 }157 }
151 /// Amount of non-default required arguments158 /// Amount of non-default required arguments
155 Self::Normal(n) => n.params.iter().filter(|p| p.1.is_none()).count(),162 Self::Normal(n) => n.params.iter().filter(|p| p.1.is_none()).count(),
156 Self::StaticBuiltin(i) => i.params().iter().filter(|p| !p.has_default()).count(),163 Self::StaticBuiltin(i) => i.params().iter().filter(|p| !p.has_default()).count(),
157 Self::Builtin(i) => i.params().iter().filter(|p| !p.has_default()).count(),164 Self::Builtin(i) => i.params().iter().filter(|p| !p.has_default()).count(),
165 Self::Thunk(_) => 0,
158 }166 }
159 }167 }
160 /// Function name, as defined in code.168 /// Function name, as defined in code.
164 Self::Normal(normal) => normal.name.clone(),172 Self::Normal(normal) => normal.name.clone(),
165 Self::StaticBuiltin(builtin) => builtin.name().into(),173 Self::StaticBuiltin(builtin) => builtin.name().into(),
166 Self::Builtin(builtin) => builtin.name().into(),174 Self::Builtin(builtin) => builtin.name().into(),
175 Self::Thunk(_) => "thunk".into(),
167 }176 }
168 }177 }
169 /// Call function using arguments evaluated in specified `call_ctx` [`Context`].178 /// Call function using arguments evaluated in specified `call_ctx` [`Context`].
182 let body_ctx = func.call_body_context(call_ctx, args, tailstrict)?;191 let body_ctx = func.call_body_context(call_ctx, args, tailstrict)?;
183 evaluate(body_ctx, &func.body)192 evaluate(body_ctx, &func.body)
184 }193 }
194 Self::Thunk(thunk) => {
195 if args.is_empty() {
196 bail!(TooManyArgsFunctionHas(0, vec![],))
197 }
198 thunk.evaluate()
199 }
185 Self::StaticBuiltin(b) => b.call(call_ctx, loc, args),200 Self::StaticBuiltin(b) => b.call(call_ctx, loc, args),
186 Self::Builtin(b) => b.call(call_ctx, loc, args),201 Self::Builtin(b) => b.call(call_ctx, loc, args),
187 }202 }
modifiedcrates/jrsonnet-evaluator/src/stdlib/format.rsdiffbeforeafterboth
308 prefix: &str,308 prefix: &str,
309 caps: bool,309 caps: bool,
310) {310) {
311 let radix = radix as f64;
312 let iv = iv.floor();311 let iv = iv.floor() as i64;
313 // Digit char indexes in reverse order, i.e312 // Digit char indexes in reverse order, i.e
314 // for radix = 16 and n = 12f: [15, 2, 1]313 // for radix = 16 and n = 12f: [15, 2, 1]
315 let digits = if iv == 0.0 {314 let digits = if iv == 0 {
316 vec![0u8]315 vec![0u8]
317 } else {316 } else {
318 let mut v = iv.abs();317 let mut v = iv.abs();
319 let mut nums = Vec::with_capacity(1);318 let mut nums = Vec::with_capacity(1);
320 while v != 0.0 {319 while v != 0 {
321 nums.push((v % radix) as u8);320 nums.push((v % radix) as u8);
322 v = (v / radix).floor();321 v /= radix;
323 }322 }
324 nums323 nums
325 };324 };
326 let neg = iv < 0.0;325 let neg = iv < 0;
327 #[allow(clippy::bool_to_int_with_if)]326 #[allow(clippy::bool_to_int_with_if)]
328 let zp = padding.saturating_sub(if neg || blank || sign { 1 } else { 0 });327 let zp = padding.saturating_sub(if neg || blank || sign { 1 } else { 0 });
329 let zp2 = zp328 let zp2 = zp
modifiedcrates/jrsonnet-rowan-parser/src/ast.rsdiffbeforeafterboth
16 Self: Sized;16 Self: Sized;
1717
18 fn syntax(&self) -> &SyntaxNode;18 fn syntax(&self) -> &SyntaxNode;
19 #[must_use]
19 fn clone_for_update(&self) -> Self20 fn clone_for_update(&self) -> Self
20 where21 where
21 Self: Sized,22 Self: Sized,
22 {23 {
23 Self::cast(self.syntax().clone_for_update()).unwrap()24 Self::cast(self.syntax().clone_for_update()).unwrap()
24 }25 }
26 #[must_use]
25 fn clone_subtree(&self) -> Self27 fn clone_subtree(&self) -> Self
26 where28 where
27 Self: Sized,29 Self: Sized,
70}72}
7173
72pub mod support {74pub mod support {
75 use rowan::NodeOrToken;
76
73 use super::{AstChildren, AstNode, AstToken, SyntaxKind, SyntaxNode, SyntaxToken};77 use super::{AstChildren, AstNode, AstToken, SyntaxKind, SyntaxNode, SyntaxToken};
7478
89 pub fn token(parent: &SyntaxNode, kind: SyntaxKind) -> Option<SyntaxToken> {93 pub fn token(parent: &SyntaxNode, kind: SyntaxKind) -> Option<SyntaxToken> {
90 parent94 parent
91 .children_with_tokens()95 .children_with_tokens()
92 .filter_map(|it| it.into_token())96 .filter_map(NodeOrToken::into_token)
93 .find(|it| it.kind() == kind)97 .find(|it| it.kind() == kind)
94 }98 }
95}99}
modifiedcrates/jrsonnet-rowan-parser/src/event.rsdiffbeforeafterboth
26 // VirtualToken { kind: SyntaxKind },26 // VirtualToken { kind: SyntaxKind },
27 /// Position of finished node27 /// Position of finished node
28 Finish {28 Finish {
29 /// Same as forward_parent of Start, but for wrapping29 /// Same as `forward_parent` of Start, but for wrapping
30 wrapper: Option<NonZeroUsize>,30 wrapper: Option<NonZeroUsize>,
31 error: Option<Box<SyntaxError>>,31 error: Option<Box<SyntaxError>>,
32 },32 },
57 if self.offset == 0 {57 if self.offset == 0 {
58 return 0.into();58 return 0.into();
59 };59 };
60 if let Some(lex) = self.lexemes.get(self.offset) {60 self.lexemes.get(self.offset).map_or_else(
61 lex.range.start()61 || {
62 } else if let Some(lex) = self.lexemes.get(self.offset - 1) {62 self.lexemes
63 .get(self.offset - 1)
63 lex.range.end()64 .map_or_else(|| panic!("hard oob"), |lex| lex.range.end())
64 } else {65 },
65 panic!("hard oob")66 |lex| lex.range.start(),
66 }67 )
67 }68 }
6869
69 pub(super) fn finish(mut self) -> Parse {70 pub(super) fn finish(mut self) -> Parse {
139 self.errors.push(LocatedSyntaxError {140 self.errors.push(LocatedSyntaxError {
140 error: *error,141 error: *error,
141 range: TextRange::new(range.0, range.1),142 range: TextRange::new(range.0, range.1),
142 })143 });
143 }144 }
144 self.builder.finish_node();145 self.builder.finish_node();
145 depth -= 1;146 depth -= 1;
158 self.errors.push(LocatedSyntaxError {159 self.errors.push(LocatedSyntaxError {
159 error: *error,160 error: *error,
160 range: TextRange::new(range.0, range.1),161 range: TextRange::new(range.0, range.1),
161 })162 });
162 }163 }
163164
164 if depth == 1 {165 if depth == 1 {
modifiedcrates/jrsonnet-stdlib/src/manifest/mod.rsdiffbeforeafterboth
98}98}
9999
100#[builtin]100#[builtin]
101#[allow(clippy::fn_params_excessive_bools)]
101pub fn builtin_manifest_yaml_stream(102pub fn builtin_manifest_yaml_stream(
102 value: Val,103 value: Val,
103 #[default(false)] indent_array_in_object: bool,104 #[default(false)] indent_array_in_object: bool,
modifiedcrates/jrsonnet-stdlib/src/manifest/yaml.rsdiffbeforeafterboth
7676
77 string.is_empty()77 string.is_empty()
78 || need_quotes_spaces(string)78 || need_quotes_spaces(string)
79 || string.starts_with(|c| matches!(c, '&' | '*' | '?' | '|' | '-' | '<' | '>' | '=' | '!' | '%' | '@'))79 || string.starts_with(['&' , '*' , '?' , '|' , '-' , '<' , '>' , '=' , '!' , '%' , '@'])
80 || string.contains(|c| matches!(c, ':' | '{' | '}' | '[' | ']' | ',' | '#' | '`' | '\"' | '\'' | '\\' | '\0'..='\x06' | '\t' | '\n' | '\r' | '\x0e'..='\x1a' | '\x1c'..='\x1f'))80 || string.contains(|c| matches!(c, ':' | '{' | '}' | '[' | ']' | ',' | '#' | '`' | '\"' | '\'' | '\\' | '\0'..='\x06' | '\t' | '\n' | '\r' | '\x0e'..='\x1a' | '\x1c'..='\x1f'))
81 || [81 || [
82 // http://yaml.org/type/bool.html82 // http://yaml.org/type/bool.html
modifiedcrates/jrsonnet-stdlib/src/strings.rsdiffbeforeafterboth
267}267}
268268
269#[cfg(test)]269#[cfg(test)]
270#[allow(clippy::float_cmp)]
270mod tests {271mod tests {
271 use super::*;272 use super::*;
272273
273 #[test]274 #[test]
274 fn parse_nat_base_8() {275 fn parse_nat_base_8() {
275 assert_eq!(parse_nat::<8>("0").unwrap(), 0.);276 assert_eq!(parse_nat::<8>("0").unwrap(), 0.);
276 assert_eq!(parse_nat::<8>("5").unwrap(), 5.);277 assert_eq!(parse_nat::<8>("5").unwrap(), 5.);
277 assert_eq!(parse_nat::<8>("32").unwrap(), 0o32 as f64);278 assert_eq!(parse_nat::<8>("32").unwrap(), f64::from(0o32));
278 assert_eq!(parse_nat::<8>("761").unwrap(), 0o761 as f64);279 assert_eq!(parse_nat::<8>("761").unwrap(), f64::from(0o761));
279 }280 }
280281
281 #[test]282 #[test]
290 fn parse_nat_base_16() {291 fn parse_nat_base_16() {
291 assert_eq!(parse_nat::<16>("0").unwrap(), 0.);292 assert_eq!(parse_nat::<16>("0").unwrap(), 0.);
292 assert_eq!(parse_nat::<16>("A").unwrap(), 10.);293 assert_eq!(parse_nat::<16>("A").unwrap(), 10.);
293 assert_eq!(parse_nat::<16>("a9").unwrap(), 0xA9 as f64);294 assert_eq!(parse_nat::<16>("a9").unwrap(), f64::from(0xA9));
294 assert_eq!(parse_nat::<16>("BbC").unwrap(), 0xBBC as f64);295 assert_eq!(parse_nat::<16>("BbC").unwrap(), f64::from(0xBBC));
295 }296 }
296}297}
297298
modifiedcrates/jrsonnet-types/src/lib.rsdiffbeforeafterboth
44
5use jrsonnet_gcmodule::Trace;5use jrsonnet_gcmodule::Trace;
6
7#[macro_export]
8macro_rules! ty {
9 ((Array<number>)) => {{
10 $crate::ComplexValType::ArrayRef(&$crate::ComplexValType::Simple($crate::ValType::Num))
11 }};
12 ((Array<ubyte>)) => {{
13 $crate::ComplexValType::ArrayRef(&$crate::ComplexValType::BoundedNumber(Some(0.0), Some(255.0)))
14 }};
15 (array) => {
16 $crate::ComplexValType::Simple($crate::ValType::Arr)
17 };
18 (boolean) => {
19 $crate::ComplexValType::Simple($crate::ValType::Bool)
20 };
21 (null) => {
22 $crate::ComplexValType::Simple($crate::ValType::Null)
23 };
24 (string) => {
25 $crate::ComplexValType::Simple($crate::ValType::Str)
26 };
27 (char) => {
28 $crate::ComplexValType::Char
29 };
30 (number) => {
31 $crate::ComplexValType::Simple($crate::ValType::Num)
32 };
33 (BoundedNumber<($min:expr), ($max:expr)>) => {{
34 $crate::ComplexValType::BoundedNumber($min, $max)
35 }};
36 (object) => {
37 $crate::ComplexValType::Simple($crate::ValType::Obj)
38 };
39 (any) => {
40 $crate::ComplexValType::Any
41 };
42 (function) => {
43 $crate::ComplexValType::Simple($crate::ValType::Func)
44 };
45 (($($a:tt) |+)) => {{
46 static CONTENTS: &'static [&'static $crate::ComplexValType] = &[
47 $(&ty!($a)),+
48 ];
49 $crate::ComplexValType::UnionRef(CONTENTS)
50 }};
51 (($($a:tt) &+)) => {{
52 static CONTENTS: &'static [&'static $crate::ComplexValType] = &[
53 $(&ty!($a)),+
54 ];
55 $crate::ComplexValType::SumRef(CONTENTS)
56 }};
57}
58
59#[test]
60fn test() {
61 assert_eq!(
62 ty!((Array<number>)),
63 ComplexValType::ArrayRef(&ComplexValType::Simple(ValType::Num))
64 );
65 assert_eq!(ty!(array), ComplexValType::Simple(ValType::Arr));
66 assert_eq!(ty!(any), ComplexValType::Any);
67 assert_eq!(
68 ty!((string | number)),
69 ComplexValType::UnionRef(&[
70 &ComplexValType::Simple(ValType::Str),
71 &ComplexValType::Simple(ValType::Num)
72 ])
73 );
74 assert_eq!(
75 format!("{}", ty!(((string & number) | (object & null)))),
76 "string & number | object & null"
77 );
78 assert_eq!(format!("{}", ty!((string | array))), "string | array");
79 assert_eq!(
80 format!("{}", ty!(((string & number) | array))),
81 "string & number | array"
82 );
83}
846
85#[derive(Debug, Clone, Copy, PartialEq, Eq, Trace)]7#[derive(Debug, Clone, Copy, PartialEq, Eq, Trace)]
86pub enum ValType {8pub enum ValType {
216 }138 }
217}139}
218
219peg::parser! {
220pub grammar parser() for str {
221 rule number() -> f64
222 = n:$(['0'..='9']+) { n.parse().unwrap() }
223
224 rule any_ty() -> ComplexValType = "any" { ComplexValType::Any }
225 rule char_ty() -> ComplexValType = "character" { ComplexValType::Char }
226 rule bool_ty() -> ComplexValType = "boolean" { ComplexValType::Simple(ValType::Bool) }
227 rule null_ty() -> ComplexValType = "null" { ComplexValType::Simple(ValType::Null) }
228 rule str_ty() -> ComplexValType = "string" { ComplexValType::Simple(ValType::Str) }
229 rule num_ty() -> ComplexValType = "number" { ComplexValType::Simple(ValType::Num) }
230 rule simple_array_ty() -> ComplexValType = "array" { ComplexValType::Simple(ValType::Arr) }
231 rule simple_object_ty() -> ComplexValType = "object" { ComplexValType::Simple(ValType::Obj) }
232 rule simple_function_ty() -> ComplexValType = "function" { ComplexValType::Simple(ValType::Func) }
233
234 rule array_ty() -> ComplexValType
235 = "Array<" t:ty() ">" { ComplexValType::Array(Box::new(t)) }
236
237 rule bounded_number_ty() -> ComplexValType
238 = "BoundedNumber<" a:number() ", " b:number() ">" { ComplexValType::BoundedNumber(Some(a), Some(b)) }
239
240 rule ty_basic() -> ComplexValType
241 = any_ty()
242 / char_ty()
243 / bool_ty()
244 / null_ty()
245 / str_ty()
246 / num_ty()
247 / simple_array_ty()
248 / simple_object_ty()
249 / simple_function_ty()
250 / array_ty()
251 / bounded_number_ty()
252
253 pub rule ty() -> ComplexValType
254 = precedence! {
255 a:(@) " | " b:@ {
256 match a {
257 ComplexValType::Union(mut a) => {
258 a.push(b);
259 ComplexValType::Union(a)
260 }
261 _ => ComplexValType::Union(vec![a, b]),
262 }
263 }
264 --
265 a:(@) " & " b:@ {
266 match a {
267 ComplexValType::Sum(mut a) => {
268 a.push(b);
269 ComplexValType::Sum(a)
270 }
271 _ => ComplexValType::Sum(vec![a, b]),
272 }
273 }
274 --
275 "(" t:ty() ")" { t }
276 t:ty_basic() { t }
277 }
278}
279}
280
281#[cfg(test)]
282pub mod tests {
283 use super::parser;
284
285 #[test]
286 fn precedence() {
287 assert_eq!(
288 parser::ty("(any & any) | (any | any) & any")
289 .unwrap()
290 .to_string(),
291 "any & any | (any | any) & any"
292 );
293 }
294
295 #[test]
296 fn array() {
297 assert_eq!(parser::ty("Array<any>").unwrap().to_string(), "array");
298 assert_eq!(
299 parser::ty("Array<number>").unwrap().to_string(),
300 "Array<number>"
301 );
302 }
303 #[test]
304 fn bounded_number() {
305 assert_eq!(
306 parser::ty("BoundedNumber<1, 2>").unwrap().to_string(),
307 "BoundedNumber<1, 2>"
308 );
309 }
310}
311140
modifiedflake.lockdiffbeforeafterboth
7 ]7 ]
8 },8 },
9 "locked": {9 "locked": {
10 "lastModified": 1715274763,10 "lastModified": 1724377159,
11 "narHash": "sha256-3Iv1PGHJn9sV3HO4FlOVaaztOxa9uGLfOmUWrH7v7+A=",11 "narHash": "sha256-ixjje1JO8ucKT41hs6n2NCde1Vc0+Zc2p2gUbJpCsMw=",
12 "owner": "ipetkov",12 "owner": "ipetkov",
13 "repo": "crane",13 "repo": "crane",
14 "rev": "27025ab71bdca30e7ed0a16c88fd74c5970fc7f5",14 "rev": "3e47b7a86c19142bd3675da49d6acef488b4dac1",
15 "type": "github"15 "type": "github"
16 },16 },
17 "original": {17 "original": {
27 ]27 ]
28 },28 },
29 "locked": {29 "locked": {
30 "lastModified": 1717285511,30 "lastModified": 1722555600,
31 "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",31 "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
32 "owner": "hercules-ci",32 "owner": "hercules-ci",
33 "repo": "flake-parts",33 "repo": "flake-parts",
34 "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",34 "rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
35 "type": "github"35 "type": "github"
36 },36 },
37 "original": {37 "original": {
40 "type": "github"40 "type": "github"
41 }41 }
42 },42 },
43 "flake-utils": {
44 "inputs": {
45 "systems": "systems"
46 },
47 "locked": {
48 "lastModified": 1710146030,
49 "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
50 "owner": "numtide",
51 "repo": "flake-utils",
52 "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
53 "type": "github"
54 },
55 "original": {
56 "owner": "numtide",
57 "repo": "flake-utils",
58 "type": "github"
59 }
60 },
61 "nixpkgs": {43 "nixpkgs": {
62 "locked": {44 "locked": {
63 "lastModified": 1715551360,45 "lastModified": 1724519568,
64 "narHash": "sha256-fGYt2XnTYUS4Q0eH8tVu3ki1+m9YTgZ+NjlfkMKzko0=",46 "narHash": "sha256-CmfrenY4cEi/mIslKy8XOGdqxUUVgT6/qMzNcAN/7z8=",
65 "owner": "nixos",47 "owner": "nixos",
66 "repo": "nixpkgs",48 "repo": "nixpkgs",
67 "rev": "836306cd7bbb9e0f89c557b2ae14df09e573ee89",49 "rev": "eb0e6df0cdd2641ec0651cd9802ff4cff3b3e915",
68 "type": "github"50 "type": "github"
69 },51 },
70 "original": {52 "original": {
84 },66 },
85 "rust-overlay": {67 "rust-overlay": {
86 "inputs": {68 "inputs": {
87 "flake-utils": "flake-utils",
88 "nixpkgs": [69 "nixpkgs": [
89 "nixpkgs"70 "nixpkgs"
90 ]71 ]
91 },72 },
92 "locked": {73 "locked": {
93 "lastModified": 1715480255,74 "lastModified": 1724466314,
94 "narHash": "sha256-gEZl8nYidQwqJhOigJ91JDjoBFoPEWVsd82AKnaE7Go=",75 "narHash": "sha256-ltKuK6shQ64uej1mYNtBsDYxttUNFiv9AcHqk0+0NQM=",
95 "owner": "oxalica",76 "owner": "oxalica",
96 "repo": "rust-overlay",77 "repo": "rust-overlay",
97 "rev": "d690205a4f01ec0930303c4204e5063958e51255",78 "rev": "2b5b3edd96ef336b00622dcabc13788fdef9e3ca",
98 "type": "github"79 "type": "github"
99 },80 },
100 "original": {81 "original": {
125 "repo": "shelly",106 "repo": "shelly",
126 "type": "github"107 "type": "github"
127 }108 }
128 },109 }
129 "systems": {
130 "locked": {
131 "lastModified": 1681028828,
132 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
133 "owner": "nix-systems",
134 "repo": "default",
135 "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
136 "type": "github"
137 },
138 "original": {
139 "owner": "nix-systems",
140 "repo": "default",
141 "type": "github"
142 }
143 }
144 },110 },
145 "root": "root",111 "root": "root",
146 "version": 7112 "version": 7
modifiedrust-toolchain.tomldiffbeforeafterboth
1[toolchain]1[toolchain]
2channel = "nightly-2024-05-10"2channel = "nightly-2024-08-20"
3components = ["rustfmt", "clippy", "rust-analyzer", "rust-src"]3components = ["rustfmt", "clippy", "rust-analyzer", "rust-src"]
44
modifiedtests/tests/builtin.rsdiffbeforeafterboth
11use jrsonnet_stdlib::ContextInitializer as StdContextInitializer;11use jrsonnet_stdlib::ContextInitializer as StdContextInitializer;
1212
13#[builtin]13#[builtin]
14fn a() -> Result<u32> {14fn a() -> u32 {
15 Ok(1)15 1
16}16}
1717
18#[test]18#[test]
29}29}
3030
31#[builtin]31#[builtin]
32fn native_add(a: u32, b: u32) -> Result<u32> {32fn native_add(a: u32, b: u32) -> u32 {
33 Ok(a + b)33 a + b
34}34}
35#[derive(Trace)]35#[derive(Trace)]
36struct NativeAddContextInitializer;36struct NativeAddContextInitializer;
72#[builtin(fields(72#[builtin(fields(
73 a: u3273 a: u32
74))]74))]
75fn curried_add(this: &curried_add, b: u32) -> Result<u32> {75fn curried_add(this: &curried_add, b: u32) -> u32 {
76 Ok(this.a + b)76 this.a + b
77}77}
7878
79#[builtin]79#[builtin]
80fn curry_add(a: u32) -> Result<FuncVal> {80fn curry_add(a: u32) -> FuncVal {
81 Ok(FuncVal::builtin(curried_add { a }))81 FuncVal::builtin(curried_add { a })
82}82}
83#[derive(Trace)]83#[derive(Trace)]
84struct CurryAddContextInitializer;84struct CurryAddContextInitializer;
modifiedtests/tests/common.rsdiffbeforeafterboth
73 .iter()73 .iter()
74 .map(|p| p.name().as_str().unwrap_or("<unnamed>").to_string())74 .map(|p| p.name().as_str().unwrap_or("<unnamed>").to_string())
75 .collect(),75 .collect(),
76 FuncVal::Thunk(_) => vec![],
76 }77 }
77}78}
7879
modifiedtests/tests/golden.rsdiffbeforeafterboth
32 Err(e) => return trace_format.format(&e).unwrap(),32 Err(e) => return trace_format.format(&e).unwrap(),
33 };33 };
34 match v.manifest(JsonFormat::default()) {34 match v.manifest(JsonFormat::default()) {
35 Ok(v) => v.to_string(),35 Ok(v) => v,
36 Err(e) => trace_format.format(&e).unwrap(),36 Err(e) => trace_format.format(&e).unwrap(),
37 }37 }
38}38}
5757
58 if !golden_path.exists() {58 if !golden_path.exists() {
59 fs::write(golden_path, &result)?;59 fs::write(golden_path, &result)?;
60 continue;
60 } else {61 }
62
61 let golden = fs::read_to_string(golden_path)?;63 let golden = fs::read_to_string(golden_path)?;
6264
78 let diff = JsonDiff::diff_string(&golden, &result, false);80 let diff = JsonDiff::diff_string(&golden, &result, false);
79 if let Some(diff) = diff {81 if let Some(diff) = diff {
80 panic!(82 panic!(
81 "Result \n{result:#}\n\83 "Result \n{result:#}\n\
82 and golden \n{golden:#}\n\84 and golden \n{golden:#}\n\
83 did not match structurally:\n{diff:#}\n\85 did not match structurally:\n{diff:#}\n\
84 for golden {}",86 for golden {}",
85 entry.path().display()87 entry.path().display()
86 );88 );
87 }89 }
94 golden,96 golden,
95 "golden didn't match for {}",97 "golden didn't match for {}",
96 entry.path().display()98 entry.path().display()
97 )99 );
98 }
99 }100 }
100101
101 Ok(())102 Ok(())