From d1d6144d8182a9ddb648e2cef5a9fb2bda3b5d9f Mon Sep 17 00:00:00 2001 From: Juniper Tyree Date: Sun, 10 Dec 2023 17:23:12 +0000 Subject: [PATCH] Upgrade to const-type-layout v0.2.0 and MSRV to 1.75-nightly --- Cargo.lock | 358 +++++++++--------- necsim/core/Cargo.toml | 6 +- necsim/core/bond/Cargo.toml | 2 +- necsim/core/bond/src/closed_open_unit_f64.rs | 2 +- necsim/core/bond/src/closed_unit_f64.rs | 2 +- necsim/core/bond/src/lib.rs | 4 +- necsim/core/bond/src/non_negative_f64.rs | 2 +- necsim/core/bond/src/non_positive_f64.rs | 2 +- necsim/core/bond/src/off_by_one_u32.rs | 24 +- necsim/core/bond/src/off_by_one_u64.rs | 26 +- necsim/core/bond/src/open_closed_unit_f64.rs | 2 +- necsim/core/bond/src/positive_f64.rs | 2 +- necsim/core/src/landscape/extent.rs | 9 + necsim/core/src/lib.rs | 4 +- necsim/core/src/reporter/combinator.rs | 4 +- necsim/impls/cuda/Cargo.toml | 6 +- necsim/impls/cuda/src/cogs/rng.rs | 16 +- necsim/impls/cuda/src/event_buffer.rs | 4 +- necsim/impls/cuda/src/lib.rs | 4 +- necsim/impls/cuda/src/value_buffer.rs | 16 +- necsim/impls/no-std/Cargo.toml | 6 +- necsim/impls/no-std/src/array2d.rs | 5 +- necsim/impls/no-std/src/cache.rs | 6 +- .../alias/individual/mod.rs | 2 +- .../alias/location/mod.rs | 2 +- .../alias/sampler/indexed/mod.rs | 2 +- .../alias/sampler/stack/mod.rs | 2 +- .../resuming/lineage.rs | 2 +- .../in_memory/cumulative/dispersal.rs | 3 +- .../no-std/src/cogs/habitat/in_memory.rs | 4 +- .../src/cogs/habitat/wrapping_noise/mod.rs | 2 +- .../src/cogs/origin_sampler/pre_sampler.rs | 4 +- necsim/impls/no-std/src/lib.rs | 8 +- .../independent/monolithic/reporter/live.rs | 2 +- necsim/impls/std/src/event_log/mod.rs | 2 +- necsim/impls/std/src/event_log/recorder.rs | 2 +- .../impls/std/src/event_log/replay/segment.rs | 2 +- .../src/event_log/replay/sorted_segments.rs | 6 +- necsim/impls/std/src/lineage_file/saver.rs | 2 +- necsim/partitioning/mpi/src/lib.rs | 2 +- necsim/plugins/common/src/biodiversity.rs | 2 +- necsim/plugins/common/src/event_counter.rs | 2 +- necsim/plugins/common/src/execution_time.rs | 2 +- necsim/plugins/common/src/progress.rs | 4 +- necsim/plugins/core/src/export.rs | 4 + necsim/plugins/core/src/import/combinator.rs | 2 +- necsim/plugins/csv/src/lib.rs | 2 +- necsim/plugins/metacommunity/src/lib.rs | 2 +- necsim/plugins/species/src/identity.rs | 2 +- .../src/individual/feather/dataframe.rs | 2 +- .../species/src/individual/feather/mod.rs | 16 +- .../species/src/individual/sqlite/database.rs | 14 +- .../species/src/individual/sqlite/mod.rs | 2 +- .../species/src/location/feather/dataframe.rs | 2 +- .../species/src/location/feather/mod.rs | 12 +- necsim/plugins/species/src/state.rs | 2 +- necsim/plugins/statistics/src/coverage.rs | 2 +- necsim/plugins/statistics/src/speciation.rs | 2 +- necsim/plugins/statistics/src/turnover.rs | 2 +- necsim/plugins/tskit/src/tree/mod.rs | 2 +- rust-toolchain | 2 +- rustcoalescence/algorithms/cuda/Cargo.toml | 2 +- .../algorithms/cuda/cpu-kernel/Cargo.toml | 2 +- .../algorithms/cuda/cpu-kernel/src/lib.rs | 2 - .../algorithms/cuda/gpu-kernel/Cargo.toml | 2 +- .../algorithms/cuda/gpu-kernel/src/lib.rs | 2 - .../src/event_skipping/initialiser/fixup.rs | 4 +- .../gillespie/classical/initialiser/fixup.rs | 4 +- .../gillespie/turnover/initialiser/fixup.rs | 4 +- .../independent/src/initialiser/fixup.rs | 4 +- .../algorithms/independent/src/launch.rs | 5 +- rustcoalescence/src/args/cli/replay.rs | 2 +- 72 files changed, 343 insertions(+), 333 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 981674d3b..03b556db8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,9 +38,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -58,30 +58,30 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -96,12 +96,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrow-format" version = "0.8.1" @@ -201,7 +195,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.39", "which", ] @@ -262,7 +256,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -282,22 +276,22 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" +checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.15.4" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "derive_builder 0.11.2", + "derive_builder", "semver 1.0.20", "serde", "serde_json", @@ -351,9 +345,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive", @@ -361,9 +355,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -380,7 +374,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -397,27 +391,28 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "const-type-layout" -version = "0.1.0" -source = "git+https://github.com/juntyr/const-type-layout?rev=e163b36#e163b364827a8402a6f55a9ac64414c849051ffd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00831a53858b3d71267f15d72570373e27806b108ed2b955e24643ce4fc833fa" dependencies = [ "const-type-layout-derive", ] [[package]] name = "const-type-layout-derive" -version = "0.1.0" -source = "git+https://github.com/juntyr/const-type-layout?rev=e163b36#e163b364827a8402a6f55a9ac64414c849051ffd" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf506f23bd8d2a7b9758a9abe0f4cddb87d6fd9206c836e65a48ecbdec74d4e" dependencies = [ "proc-macro-error", "proc-macro2", @@ -530,34 +525,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro 0.11.2", -] - [[package]] name = "derive_builder" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ - "derive_builder_macro 0.12.0", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", + "derive_builder_macro", ] [[package]] @@ -572,23 +546,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core 0.11.2", - "syn 1.0.109", -] - [[package]] name = "derive_builder_macro" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ - "derive_builder_core 0.12.0", + "derive_builder_core", "syn 1.0.109", ] @@ -600,14 +564,14 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "dyn-clone" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "either" @@ -626,12 +590,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -694,9 +658,9 @@ checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "js-sys", @@ -707,24 +671,22 @@ dependencies = [ [[package]] name = "git-version" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b0decc02f4636b9ccad390dcbe77b722a77efedfa393caf8379a51d5c61899" +checksum = "13ad01ffa8221f7fe8b936d6ffb2a3e7ad428885a04fad51866a5f33eafda57c" dependencies = [ "git-version-macro", - "proc-macro-hack", ] [[package]] name = "git-version-macro" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f" +checksum = "84488ccbdb24ad6f56dc1863b4a8154a7856cd3c6c7610401634fab3cb588dae" dependencies = [ - "proc-macro-hack", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -750,9 +712,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -764,7 +726,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -773,12 +735,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" - [[package]] name = "hex" version = "0.4.3" @@ -791,7 +747,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -816,22 +772,11 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys", -] - [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" @@ -850,9 +795,9 @@ checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -871,9 +816,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -892,7 +837,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -913,9 +858,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "log" @@ -986,7 +931,7 @@ source = "git+https://github.com/juntyr/rsmpi?rev=ed8c10d#ed8c10d1a64b6f63c57d91 dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1230,9 +1175,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "pcg_rand" @@ -1292,7 +1237,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1319,17 +1264,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -1456,7 +1395,7 @@ dependencies = [ [[package]] name = "rust-cuda" version = "0.1.0" -source = "git+https://github.com/juntyr/rust-cuda?rev=5d5cd02#5d5cd02ea0bca23390785ef5284397124fa3bfbf" +source = "git+https://github.com/juntyr/rust-cuda?rev=b26635f#b26635fc618c71d9668dedaed65c7f4fcacf5e04" dependencies = [ "const-type-layout", "final", @@ -1470,7 +1409,7 @@ dependencies = [ [[package]] name = "rust-cuda-derive" version = "0.1.0" -source = "git+https://github.com/juntyr/rust-cuda?rev=5d5cd02#5d5cd02ea0bca23390785ef5284397124fa3bfbf" +source = "git+https://github.com/juntyr/rust-cuda?rev=b26635f#b26635fc618c71d9668dedaed65c7f4fcacf5e04" dependencies = [ "cargo_metadata", "colored", @@ -1489,7 +1428,7 @@ dependencies = [ [[package]] name = "rust-cuda-ptx-jit" version = "0.1.0" -source = "git+https://github.com/juntyr/rust-cuda?rev=5d5cd02#5d5cd02ea0bca23390785ef5284397124fa3bfbf" +source = "git+https://github.com/juntyr/rust-cuda?rev=b26635f#b26635fc618c71d9668dedaed65c7f4fcacf5e04" dependencies = [ "lazy_static", "regex", @@ -1559,7 +1498,7 @@ dependencies = [ "bincode", "clap", "colored", - "derive_builder 0.12.0", + "derive_builder", "fnv", "getrandom", "log", @@ -1693,22 +1632,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.20" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "seahash" @@ -1745,22 +1684,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1776,9 +1715,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -1833,9 +1772,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "stable_deref_trait" @@ -1851,9 +1790,9 @@ checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" [[package]] name = "strip-ansi-escapes" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011cbb39cf7c1f62871aea3cc46e5817b0937b49e9447370c93cacbe93a766d8" +checksum = "55ff8ef943b384c414f54aefa961dd2bd853add74ec75e7ac74cf91dba62bcfa" dependencies = [ "vte", ] @@ -1877,9 +1816,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -1903,7 +1842,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1994,11 +1933,10 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vte" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983" +checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" dependencies = [ - "arrayvec", "utf8parse", "vte_generate_state_changes", ] @@ -2021,9 +1959,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2031,24 +1969,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2056,22 +1994,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "weezl" @@ -2119,7 +2057,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -2128,13 +2075,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -2143,58 +2105,100 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "zerocopy" -version = "0.7.15" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ba595b9f2772fbee2312de30eeb80ec773b4cb2f1e8098db024afadda6c06f" +checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.15" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772666c41fb6dceaf520b564b962d738a8e1a83b41bd48945f50837aed78bb1d" +checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.39", ] diff --git a/necsim/core/Cargo.toml b/necsim/core/Cargo.toml index 5d092f9e7..fca0671d1 100644 --- a/necsim/core/Cargo.toml +++ b/necsim/core/Cargo.toml @@ -15,12 +15,12 @@ cuda = ["rust-cuda"] necsim-core-maths = { path = "maths" } necsim-core-bond = { path = "bond" } -const-type-layout = { git = "https://github.com/juntyr/const-type-layout", rev = "e163b36" } +const-type-layout = { version = "0.2.0", features = ["derive"] } contracts = "0.6.3" serde = { version = "1.0", default-features = false, features = ["derive"] } [target.'cfg(target_os = "cuda")'.dependencies] -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive"], optional = true } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive"], optional = true } [target.'cfg(not(target_os = "cuda"))'.dependencies] -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive", "host"], optional = true } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive", "host"], optional = true } diff --git a/necsim/core/bond/Cargo.toml b/necsim/core/bond/Cargo.toml index 06c647f03..5e8419b4c 100644 --- a/necsim/core/bond/Cargo.toml +++ b/necsim/core/bond/Cargo.toml @@ -13,5 +13,5 @@ default = [] [dependencies] necsim-core-maths = { path = "../maths" } -const-type-layout = { git = "https://github.com/juntyr/const-type-layout", rev = "e163b36" } +const-type-layout = { version = "0.2.0", features = ["derive"] } serde = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/necsim/core/bond/src/closed_open_unit_f64.rs b/necsim/core/bond/src/closed_open_unit_f64.rs index ebadc9f85..0d2155c13 100644 --- a/necsim/core/bond/src/closed_open_unit_f64.rs +++ b/necsim/core/bond/src/closed_open_unit_f64.rs @@ -97,7 +97,7 @@ impl Eq for ClosedOpenUnitF64 {} impl PartialOrd for ClosedOpenUnitF64 { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/necsim/core/bond/src/closed_unit_f64.rs b/necsim/core/bond/src/closed_unit_f64.rs index e99cc6cee..664c9f20e 100644 --- a/necsim/core/bond/src/closed_unit_f64.rs +++ b/necsim/core/bond/src/closed_unit_f64.rs @@ -131,7 +131,7 @@ impl Eq for ClosedUnitF64 {} impl PartialOrd for ClosedUnitF64 { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/necsim/core/bond/src/lib.rs b/necsim/core/bond/src/lib.rs index 2184632b9..67c6b9e81 100644 --- a/necsim/core/bond/src/lib.rs +++ b/necsim/core/bond/src/lib.rs @@ -3,10 +3,8 @@ #![feature(const_fn_floating_point_arithmetic)] #![feature(const_float_bits_conv)] #![feature(const_float_classify)] -#![feature(const_trait_impl)] #![feature(const_type_name)] -#![feature(const_mut_refs)] -#![feature(const_num_from_num)] +#![feature(offset_of)] #[macro_use] extern crate const_type_layout; diff --git a/necsim/core/bond/src/non_negative_f64.rs b/necsim/core/bond/src/non_negative_f64.rs index 700d5d9f3..cf60da503 100644 --- a/necsim/core/bond/src/non_negative_f64.rs +++ b/necsim/core/bond/src/non_negative_f64.rs @@ -170,7 +170,7 @@ impl Eq for NonNegativeF64 {} impl PartialOrd for NonNegativeF64 { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/necsim/core/bond/src/non_positive_f64.rs b/necsim/core/bond/src/non_positive_f64.rs index b0c1c1fd8..62807c4bf 100644 --- a/necsim/core/bond/src/non_positive_f64.rs +++ b/necsim/core/bond/src/non_positive_f64.rs @@ -103,7 +103,7 @@ impl Eq for NonPositiveF64 {} impl PartialOrd for NonPositiveF64 { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/necsim/core/bond/src/off_by_one_u32.rs b/necsim/core/bond/src/off_by_one_u32.rs index 00c93b3b0..15634939f 100644 --- a/necsim/core/bond/src/off_by_one_u32.rs +++ b/necsim/core/bond/src/off_by_one_u32.rs @@ -28,9 +28,14 @@ impl OffByOneU32 { /// /// Returns `OffByOneU32Error` if not `1 <= value <= 2^32` pub const fn new(value: u64) -> Result { - match u32::try_from(value.wrapping_sub(1)) { - Ok(value) => Ok(Self(value)), - Err(_) => Err(OffByOneU32Error(value)), + // match u32::try_from(value.wrapping_sub(1)) { + // Ok(value) => Ok(Self(value)), + // Err(_) => Err(OffByOneU32Error(value)), + // } + match value.wrapping_sub(1) { + #[allow(clippy::cast_possible_truncation)] + value if value <= (u32::MAX as u64) => Ok(Self(value as u32)), + _ => Err(OffByOneU32Error(value)), } } @@ -47,7 +52,8 @@ impl OffByOneU32 { #[must_use] pub const fn get(self) -> u64 { - u64::from(self) + // u64::from(self) + (self.0 as u64) + 1_u64 } #[must_use] @@ -84,32 +90,32 @@ impl TryFrom for OffByOneU32 { } } -impl const From for u64 { +impl From for u64 { fn from(val: OffByOneU32) -> Self { u64::from(val.0) + 1_u64 } } -impl const From for NonZeroU64 { +impl From for NonZeroU64 { fn from(val: OffByOneU32) -> Self { // Safety: always at least 1 unsafe { NonZeroU64::new_unchecked(u64::from(val)) } } } -impl const From for i64 { +impl From for i64 { fn from(val: OffByOneU32) -> Self { i64::from(val.0) + 1_i64 } } -impl const From for f64 { +impl From for f64 { fn from(val: OffByOneU32) -> Self { f64::from(val.0) + 1.0_f64 } } -impl const From for usize { +impl From for usize { fn from(val: OffByOneU32) -> Self { (val.0 as usize) + 1_usize } diff --git a/necsim/core/bond/src/off_by_one_u64.rs b/necsim/core/bond/src/off_by_one_u64.rs index a85948405..853dc57e1 100644 --- a/necsim/core/bond/src/off_by_one_u64.rs +++ b/necsim/core/bond/src/off_by_one_u64.rs @@ -35,9 +35,14 @@ impl OffByOneU64 { /// /// Returns `OffByOneU64Error` if not `1 <= value <= 2^64` pub const fn new(value: u128) -> Result { - match u64::try_from(value.wrapping_sub(1)) { - Ok(value) => Ok(Self(value)), - Err(_) => Err(OffByOneU64Error(value)), + // match u64::try_from(value.wrapping_sub(1)) { + // Ok(value) => Ok(Self(value)), + // Err(_) => Err(OffByOneU64Error(value)), + // } + match value.wrapping_sub(1) { + #[allow(clippy::cast_possible_truncation)] + value if value < (u64::MAX as u128) => Ok(Self(value as u64)), + _ => Err(OffByOneU64Error(value)), } } @@ -54,7 +59,8 @@ impl OffByOneU64 { #[must_use] pub const fn get(self) -> u128 { - u128::from(self) + // u128::from(self) + (self.0 as u128) + 1_u128 } #[must_use] @@ -91,39 +97,39 @@ impl TryFrom for OffByOneU64 { } } -impl const From for OffByOneU64 { +impl From for OffByOneU64 { fn from(val: NonZeroU32) -> Self { Self(u64::from(val.get()) - 1) } } -impl const From for OffByOneU64 { +impl From for OffByOneU64 { fn from(val: OffByOneU32) -> Self { Self(val.get() - 1) } } -impl const From for OffByOneU64 { +impl From for OffByOneU64 { fn from(val: NonZeroU64) -> Self { Self(val.get() - 1) } } -impl const From for NonZeroU64 { +impl From for NonZeroU64 { fn from(val: OffByOneU64) -> Self { // Safety: always at least 1, max case undefined behaviour unsafe { NonZeroU64::new_unchecked(val.0 + 1) } } } -impl const From for f64 { +impl From for f64 { #[allow(clippy::cast_precision_loss)] fn from(val: OffByOneU64) -> Self { (val.0 as f64) + 1.0_f64 } } -impl const From for u128 { +impl From for u128 { fn from(val: OffByOneU64) -> Self { u128::from(val.0) + 1_u128 } diff --git a/necsim/core/bond/src/open_closed_unit_f64.rs b/necsim/core/bond/src/open_closed_unit_f64.rs index ef151be16..a82fdfc37 100644 --- a/necsim/core/bond/src/open_closed_unit_f64.rs +++ b/necsim/core/bond/src/open_closed_unit_f64.rs @@ -103,7 +103,7 @@ impl Eq for OpenClosedUnitF64 {} impl PartialOrd for OpenClosedUnitF64 { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/necsim/core/bond/src/positive_f64.rs b/necsim/core/bond/src/positive_f64.rs index c55fadaab..ff710fceb 100644 --- a/necsim/core/bond/src/positive_f64.rs +++ b/necsim/core/bond/src/positive_f64.rs @@ -131,7 +131,7 @@ impl Eq for PositiveF64 {} impl PartialOrd for PositiveF64 { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } diff --git a/necsim/core/src/landscape/extent.rs b/necsim/core/src/landscape/extent.rs index 09ac62d76..1339938f3 100644 --- a/necsim/core/src/landscape/extent.rs +++ b/necsim/core/src/landscape/extent.rs @@ -64,6 +64,15 @@ impl LandscapeExtent { } } +impl IntoIterator for &LandscapeExtent { + type IntoIter = LocationIterator; + type Item = Location; + + fn into_iter(self) -> Self::IntoIter { + self.iter() + } +} + #[derive(Debug, PartialEq, Eq)] pub struct LocationIterator { x: u32, diff --git a/necsim/core/src/lib.rs b/necsim/core/src/lib.rs index 13be9c215..0888987ba 100644 --- a/necsim/core/src/lib.rs +++ b/necsim/core/src/lib.rs @@ -1,9 +1,7 @@ #![deny(clippy::pedantic)] #![no_std] -#![feature(const_trait_impl)] #![feature(const_type_name)] -#![feature(const_mut_refs)] -#![feature(const_refs_to_cell)] +#![feature(offset_of)] #![feature(control_flow_enum)] #![feature(min_specialization)] diff --git a/necsim/core/src/reporter/combinator.rs b/necsim/core/src/reporter/combinator.rs index 17e370a12..0129bdc87 100644 --- a/necsim/core/src/reporter/combinator.rs +++ b/necsim/core/src/reporter/combinator.rs @@ -61,6 +61,8 @@ where }); fn initialise(&mut self) -> Result<(), alloc::string::String> { - self.front.initialise().and_then(|_| self.tail.initialise()) + self.front + .initialise() + .and_then(|()| self.tail.initialise()) } } diff --git a/necsim/impls/cuda/Cargo.toml b/necsim/impls/cuda/Cargo.toml index 411450d79..12d611473 100644 --- a/necsim/impls/cuda/Cargo.toml +++ b/necsim/impls/cuda/Cargo.toml @@ -10,12 +10,12 @@ edition = "2018" [dependencies] necsim-core = { path = "../../core", features = ["cuda"] } -const-type-layout = { git = "https://github.com/juntyr/const-type-layout", rev = "e163b36" } +const-type-layout = { version = "0.2.0", features = ["derive"] } contracts = "0.6.3" serde = { version = "1.0", default-features = false, features = ["derive"] } [target.'cfg(target_os = "cuda")'.dependencies] -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive"] } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive"] } [target.'cfg(not(target_os = "cuda"))'.dependencies] -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive", "host"] } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive", "host"] } diff --git a/necsim/impls/cuda/src/cogs/rng.rs b/necsim/impls/cuda/src/cogs/rng.rs index 63073c126..bc34a8f0f 100644 --- a/necsim/impls/cuda/src/cogs/rng.rs +++ b/necsim/impls/cuda/src/cogs/rng.rs @@ -12,13 +12,13 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[cuda(free = "M", free = "R")] pub struct CudaRng where - R: RngCore + StackOnly + ~const TypeGraphLayout, + R: RngCore + StackOnly + TypeGraphLayout, { inner: R, marker: PhantomData, } -impl + StackOnly + ~const TypeGraphLayout> Clone for CudaRng { +impl + StackOnly + TypeGraphLayout> Clone for CudaRng { fn clone(&self) -> Self { Self { inner: self.inner.clone(), @@ -27,7 +27,7 @@ impl + StackOnly + ~const TypeGraphLayout> Clone for } } -impl + StackOnly + ~const TypeGraphLayout> From for CudaRng { +impl + StackOnly + TypeGraphLayout> From for CudaRng { #[must_use] #[inline] fn from(rng: R) -> Self { @@ -38,9 +38,7 @@ impl + StackOnly + ~const TypeGraphLayout> From f } } -impl + StackOnly + ~const TypeGraphLayout> RngCore - for CudaRng -{ +impl + StackOnly + TypeGraphLayout> RngCore for CudaRng { type Seed = >::Seed; #[must_use] @@ -59,7 +57,7 @@ impl + StackOnly + ~const TypeGraphLayout> RngCore + StackOnly + ~const TypeGraphLayout> PrimeableRng +impl + StackOnly + TypeGraphLayout> PrimeableRng for CudaRng { #[inline] @@ -68,13 +66,13 @@ impl + StackOnly + ~const TypeGraphLayout> Prim } } -impl + StackOnly + ~const TypeGraphLayout> Serialize for CudaRng { +impl + StackOnly + TypeGraphLayout> Serialize for CudaRng { fn serialize(&self, serializer: S) -> Result { self.inner.serialize(serializer) } } -impl<'de, M: MathsCore, R: RngCore + StackOnly + ~const TypeGraphLayout> Deserialize<'de> +impl<'de, M: MathsCore, R: RngCore + StackOnly + TypeGraphLayout> Deserialize<'de> for CudaRng { fn deserialize>(deserializer: D) -> Result { diff --git a/necsim/impls/cuda/src/event_buffer.rs b/necsim/impls/cuda/src/event_buffer.rs index fec5a6aaa..6fb9f314f 100644 --- a/necsim/impls/cuda/src/event_buffer.rs +++ b/necsim/impls/cuda/src/event_buffer.rs @@ -43,7 +43,7 @@ pub struct EventBuffer { pub trait EventType { type Event: 'static - + ~const rust_cuda::const_type_layout::TypeGraphLayout + + rust_cuda::const_type_layout::TypeGraphLayout + rust_cuda::safety::StackOnly + Into + Into @@ -79,7 +79,7 @@ impl fmt::Debug fmt.debug_struct("EventBuffer") .field("max_events", &self.max_events) .field("event_counter", &self.event_counter) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/cuda/src/lib.rs b/necsim/impls/cuda/src/lib.rs index 44c4c984d..e7d657c28 100644 --- a/necsim/impls/cuda/src/lib.rs +++ b/necsim/impls/cuda/src/lib.rs @@ -1,10 +1,8 @@ #![deny(clippy::pedantic)] #![no_std] #![feature(core_intrinsics)] -#![feature(const_trait_impl)] #![feature(const_type_name)] -#![feature(const_mut_refs)] -#![feature(const_refs_to_cell)] +#![feature(offset_of)] #![cfg_attr(target_os = "cuda", feature(asm_experimental_arch))] #![cfg_attr(target_os = "cuda", feature(asm_const))] #![cfg_attr(target_os = "cuda", feature(const_float_bits_conv))] diff --git a/necsim/impls/cuda/src/value_buffer.rs b/necsim/impls/cuda/src/value_buffer.rs index e70488a08..04d844f6f 100644 --- a/necsim/impls/cuda/src/value_buffer.rs +++ b/necsim/impls/cuda/src/value_buffer.rs @@ -23,7 +23,7 @@ use super::utils::MaybeSome; #[allow(clippy::module_name_repetitions)] pub struct ValueBuffer where - T: StackOnly + ~const TypeGraphLayout, + T: StackOnly + TypeGraphLayout, { #[cuda(embed)] mask: SplitSliceOverCudaThreadsConstStride, 1_usize>, @@ -33,9 +33,7 @@ where } #[cfg(not(target_os = "cuda"))] -impl - ValueBuffer -{ +impl ValueBuffer { /// # Errors /// Returns a `rustacuda::errors::CudaError` iff an error occurs inside CUDA pub fn new(block_size: &BlockSize, grid_size: &GridSize) -> CudaResult { @@ -69,7 +67,7 @@ impl } #[cfg(not(target_os = "cuda"))] -impl ValueBuffer { +impl ValueBuffer { pub fn iter(&self) -> impl Iterator> { self.mask .iter() @@ -92,11 +90,11 @@ impl ValueBuffer ValueBuffer { +impl ValueBuffer { pub fn with_value_for_core) -> Option>(&mut self, inner: F) { let value = if self .mask - .get(0) + .first() .map(CudaExchangeItem::read) .copied() .unwrap_or(false) @@ -119,7 +117,7 @@ impl ValueBuffer { } #[cfg(target_os = "cuda")] -impl ValueBuffer { +impl ValueBuffer { pub fn take_value_for_core(&mut self) -> Option { #[allow(clippy::option_if_let_else)] if let Some(mask) = self.mask.get_mut(0) { @@ -137,7 +135,7 @@ impl ValueBuffer ValueBuffer { +impl ValueBuffer { pub fn put_value_for_core(&mut self, value: Option) { if let Some(mask) = self.mask.get_mut(0) { mask.write(value.is_some()); diff --git a/necsim/impls/no-std/Cargo.toml b/necsim/impls/no-std/Cargo.toml index d6ae51e71..f145ea908 100644 --- a/necsim/impls/no-std/Cargo.toml +++ b/necsim/impls/no-std/Cargo.toml @@ -17,7 +17,7 @@ necsim-core-maths = { path = "../../core/maths" } necsim-core-bond = { path = "../../core/bond" } necsim-partitioning-core = { path = "../../partitioning/core" } -const-type-layout = { git = "https://github.com/juntyr/const-type-layout", rev = "e163b36" } +const-type-layout = { version = "0.2.0", features = ["derive"] } contracts = "0.6.3" libm = "0.2" hashbrown = "0.13" @@ -30,7 +30,7 @@ fnv = { version = "1.0", default-features = false, features = [] } rand_core = "0.6" [target.'cfg(target_os = "cuda")'.dependencies] -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive"], optional = true } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive"], optional = true } [target.'cfg(not(target_os = "cuda"))'.dependencies] -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive", "host"], optional = true } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive", "host"], optional = true } diff --git a/necsim/impls/no-std/src/array2d.rs b/necsim/impls/no-std/src/array2d.rs index 281c479f8..14fe7fc83 100644 --- a/necsim/impls/no-std/src/array2d.rs +++ b/necsim/impls/no-std/src/array2d.rs @@ -15,7 +15,7 @@ use core::ops::{Index, IndexMut}; feature = "cuda", cuda( free = "T", - bound = "T: rust_cuda::safety::StackOnly + ~const const_type_layout::TypeGraphLayout" + bound = "T: rust_cuda::safety::StackOnly + const_type_layout::TypeGraphLayout" ) )] pub struct Array2D { @@ -77,7 +77,7 @@ impl Array2D { where T: Clone, { - let row_len = elements.get(0).map_or(0, Vec::len); + let row_len = elements.first().map_or(0, Vec::len); if !elements.iter().all(|row| row.len() == row_len) { return Err(Error::DimensionMismatch); } @@ -317,6 +317,7 @@ impl Array2D { Ok(self.array[start..end].iter()) } + #[allow(clippy::missing_panics_doc)] /// Returns an [`Iterator`] over all rows. Each [`Item`] is itself another /// [`Iterator`] over references to the elements in that row. /// diff --git a/necsim/impls/no-std/src/cache.rs b/necsim/impls/no-std/src/cache.rs index 12095176b..bfcd00d83 100644 --- a/necsim/impls/no-std/src/cache.rs +++ b/necsim/impls/no-std/src/cache.rs @@ -1,5 +1,5 @@ use alloc::{boxed::Box, vec::Vec}; -use core::hash::{BuildHasher, Hash, Hasher}; +use core::hash::{BuildHasher, Hash}; use fnv::FnvBuildHasher; @@ -41,9 +41,7 @@ impl DirectMappedCache { return true; } - let mut hasher = self.build_hasher.build_hasher(); - value.hash(&mut hasher); - let hash = hasher.finish(); + let hash = self.build_hasher.hash_one(&value); #[allow(clippy::cast_possible_truncation)] let index = (hash % (self.capacity() as u64)) as usize; diff --git a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/individual/mod.rs b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/individual/mod.rs index 94049419d..2abdb6174 100644 --- a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/individual/mod.rs +++ b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/individual/mod.rs @@ -164,7 +164,7 @@ impl< f.debug_struct("IndividualAliasActiveLineageSampler") .field("alias_sampler", &self.alias_sampler) .field("number_active_lineages", &self.number_active_lineages) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/location/mod.rs b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/location/mod.rs index b8c4e29fc..cecc4cd34 100644 --- a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/location/mod.rs +++ b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/location/mod.rs @@ -214,7 +214,7 @@ impl< f.debug_struct("LocationAliasActiveLineageSampler") .field("alias_sampler", &self.alias_sampler) .field("number_active_lineages", &self.number_active_lineages) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/indexed/mod.rs b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/indexed/mod.rs index 857a81824..029ec46d8 100644 --- a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/indexed/mod.rs +++ b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/indexed/mod.rs @@ -36,7 +36,7 @@ impl fmt::Debug for DynamicAliasMethodIndexedSampler { fmt.debug_struct("DynamicAliasMethodIndexedSampler") .field("exponents", &self.exponents) .field("total_weight", &self.total_weight().get()) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/stack/mod.rs b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/stack/mod.rs index a0af49b8e..63ae4c224 100644 --- a/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/stack/mod.rs +++ b/necsim/impls/no-std/src/cogs/active_lineage_sampler/alias/sampler/stack/mod.rs @@ -32,7 +32,7 @@ impl fmt::Debug for DynamicAliasMethodStackSampler { fmt.debug_struct("DynamicAliasMethodStackSampler") .field("exponents", &self.exponents) .field("total_weight", &self.total_weight().get()) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/no-std/src/cogs/active_lineage_sampler/resuming/lineage.rs b/necsim/impls/no-std/src/cogs/active_lineage_sampler/resuming/lineage.rs index eafe7e81d..22c52579e 100644 --- a/necsim/impls/no-std/src/cogs/active_lineage_sampler/resuming/lineage.rs +++ b/necsim/impls/no-std/src/cogs/active_lineage_sampler/resuming/lineage.rs @@ -47,7 +47,7 @@ impl ExceptionalLineage { exceptional_lineages: &mut Vec, ) -> impl Iterator + '_ { exceptional_lineages - .drain_filter(|exceptional_lineage| { + .extract_if(|exceptional_lineage| { matches!(exceptional_lineage, ExceptionalLineage::Coalescence { .. }) }) .map(|exceptional_lineage| match exceptional_lineage { diff --git a/necsim/impls/no-std/src/cogs/dispersal_sampler/in_memory/cumulative/dispersal.rs b/necsim/impls/no-std/src/cogs/dispersal_sampler/in_memory/cumulative/dispersal.rs index d5495b774..0805a959d 100644 --- a/necsim/impls/no-std/src/cogs/dispersal_sampler/in_memory/cumulative/dispersal.rs +++ b/necsim/impls/no-std/src/cogs/dispersal_sampler/in_memory/cumulative/dispersal.rs @@ -42,7 +42,8 @@ impl, G: RngCore> DispersalSampler // last valid habitat (the alias method will make this obsolete). let Some(Some(valid_dispersal_target_index)) = self .valid_dispersal_targets - .get(location_index * habitat_area + dispersal_target_index).copied() + .get(location_index * habitat_area + dispersal_target_index) + .copied() else { unreachable!("habitat dispersal origin must disperse somewhere") }; diff --git a/necsim/impls/no-std/src/cogs/habitat/in_memory.rs b/necsim/impls/no-std/src/cogs/habitat/in_memory.rs index 7ee8a1cd4..838ee499f 100644 --- a/necsim/impls/no-std/src/cogs/habitat/in_memory.rs +++ b/necsim/impls/no-std/src/cogs/habitat/in_memory.rs @@ -142,10 +142,10 @@ impl InMemoryHabitat { } else { true }, "habitat extent has the dimension of the habitat array")] pub fn try_new(habitat: Array2D) -> Option { let Ok(width) = OffByOneU32::new(habitat.num_columns() as u64) else { - return None + return None; }; let Ok(height) = OffByOneU32::new(habitat.num_rows() as u64) else { - return None + return None; }; let habitat = habitat.into_row_major().into_boxed_slice(); diff --git a/necsim/impls/no-std/src/cogs/habitat/wrapping_noise/mod.rs b/necsim/impls/no-std/src/cogs/habitat/wrapping_noise/mod.rs index e86345216..e6482e557 100644 --- a/necsim/impls/no-std/src/cogs/habitat/wrapping_noise/mod.rs +++ b/necsim/impls/no-std/src/cogs/habitat/wrapping_noise/mod.rs @@ -39,7 +39,7 @@ impl fmt::Debug for WrappingNoiseHabitat { .field("scale", &self.scale) .field("persistence", &self.persistence) .field("octaves", &self.octaves) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/no-std/src/cogs/origin_sampler/pre_sampler.rs b/necsim/impls/no-std/src/cogs/origin_sampler/pre_sampler.rs index d2a133e71..8219fc8f2 100644 --- a/necsim/impls/no-std/src/cogs/origin_sampler/pre_sampler.rs +++ b/necsim/impls/no-std/src/cogs/origin_sampler/pre_sampler.rs @@ -42,7 +42,7 @@ impl> fmt::Debug for OriginPreSampler fmt::Result { fmt.debug_struct(stringify!(OriginPreSampler)) .field("proportion", &self.proportion) - .finish() + .finish_non_exhaustive() } } @@ -78,7 +78,7 @@ impl> OriginPreSampler { OriginPreSampler { proportion: self.proportion * percentage, - inner: core::iter::repeat(()).scan(0.5_f64, move |quasi_random, _| { + inner: core::iter::repeat(()).scan(0.5_f64, move |quasi_random, ()| { if percentage <= 0.0_f64 { return None; } diff --git a/necsim/impls/no-std/src/lib.rs b/necsim/impls/no-std/src/lib.rs index 8e8c88d8a..f26467e88 100644 --- a/necsim/impls/no-std/src/lib.rs +++ b/necsim/impls/no-std/src/lib.rs @@ -1,13 +1,9 @@ #![deny(clippy::pedantic)] #![no_std] #![feature(iter_advance_by)] -#![feature(drain_filter)] -#![feature(type_alias_impl_trait)] -#![feature(const_trait_impl)] +#![feature(extract_if)] #![feature(const_type_name)] -#![feature(const_mut_refs)] -#![feature(const_refs_to_cell)] -#![feature(control_flow_enum)] +#![feature(offset_of)] #![feature(negative_impls)] #![feature(impl_trait_in_assoc_type)] #![allow(incomplete_features)] diff --git a/necsim/impls/no-std/src/parallelisation/independent/monolithic/reporter/live.rs b/necsim/impls/no-std/src/parallelisation/independent/monolithic/reporter/live.rs index a1f009efa..7d632aabf 100644 --- a/necsim/impls/no-std/src/parallelisation/independent/monolithic/reporter/live.rs +++ b/necsim/impls/no-std/src/parallelisation/independent/monolithic/reporter/live.rs @@ -110,7 +110,7 @@ impl<'l, 'p, R: Reporter, P: LocalPartition<'p, R>> WaterLevelReporterProxy<'l, // Move fast events below the new water level into slow events self.slow_events.extend( self.fast_events - .drain_filter(|event| event.event_time() < water_level), + .extract_if(|event| event.event_time() < water_level), ); } diff --git a/necsim/impls/std/src/event_log/mod.rs b/necsim/impls/std/src/event_log/mod.rs index 215430da7..c30da4285 100644 --- a/necsim/impls/std/src/event_log/mod.rs +++ b/necsim/impls/std/src/event_log/mod.rs @@ -24,7 +24,7 @@ impl fmt::Debug for EventLogHeader { .field("min_time", &self.min_time) .field("max_time", &self.max_time) .field("length", &self.length) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/std/src/event_log/recorder.rs b/necsim/impls/std/src/event_log/recorder.rs index 2fab5d5e5..3be651a62 100644 --- a/necsim/impls/std/src/event_log/recorder.rs +++ b/necsim/impls/std/src/event_log/recorder.rs @@ -225,7 +225,7 @@ impl fmt::Debug for EventLogRecorder { .field("directory", &self.directory) .field("segment_index", &self.segment_index) .field("buffer", &EventBufferLen(self.buffer.len())) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/std/src/event_log/replay/segment.rs b/necsim/impls/std/src/event_log/replay/segment.rs index a61fc8d7a..d63238a9f 100644 --- a/necsim/impls/std/src/event_log/replay/segment.rs +++ b/necsim/impls/std/src/event_log/replay/segment.rs @@ -28,7 +28,7 @@ impl fmt::Debug for SortedSegment { fmt.debug_struct(stringify!(SortedSegment)) .field("path", &self.path) .field("header", &self.header) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/impls/std/src/event_log/replay/sorted_segments.rs b/necsim/impls/std/src/event_log/replay/sorted_segments.rs index 51e6a7280..2c209cd95 100644 --- a/necsim/impls/std/src/event_log/replay/sorted_segments.rs +++ b/necsim/impls/std/src/event_log/replay/sorted_segments.rs @@ -31,7 +31,9 @@ impl fmt::Debug for SortedSortedSegments { debug.field("max_time", &last.header().max_time()); } - debug.field("length", &self.length()).finish() + debug + .field("length", &self.length()) + .finish_non_exhaustive() } } @@ -66,7 +68,7 @@ impl Iterator for SortedSortedSegments { &mut self.next, loop { let Some(next_segment) = self.segments.last_mut() else { - break None + break None; }; if let Some(next_event) = next_segment.next() { diff --git a/necsim/impls/std/src/lineage_file/saver.rs b/necsim/impls/std/src/lineage_file/saver.rs index 061dfd452..31b0f6f39 100644 --- a/necsim/impls/std/src/lineage_file/saver.rs +++ b/necsim/impls/std/src/lineage_file/saver.rs @@ -31,7 +31,7 @@ impl fmt::Debug for LineageFileSaver { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(stringify!(LineageFileSaver)) .field("path", &self.path) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/partitioning/mpi/src/lib.rs b/necsim/partitioning/mpi/src/lib.rs index f1d9fb57e..ca58d59e2 100644 --- a/necsim/partitioning/mpi/src/lib.rs +++ b/necsim/partitioning/mpi/src/lib.rs @@ -71,7 +71,7 @@ impl fmt::Debug for MpiPartitioning { "progress_interval", &FormattedDuration(self.progress_interval), ) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/common/src/biodiversity.rs b/necsim/plugins/common/src/biodiversity.rs index 20df5f8d8..8c9379829 100644 --- a/necsim/plugins/common/src/biodiversity.rs +++ b/necsim/plugins/common/src/biodiversity.rs @@ -13,7 +13,7 @@ impl fmt::Debug for BiodiversityReporter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(stringify!(BiodiversityReporter)) .field("biodiversity", &self.biodiversity) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/common/src/event_counter.rs b/necsim/plugins/common/src/event_counter.rs index ddeb68520..a65901ce4 100644 --- a/necsim/plugins/common/src/event_counter.rs +++ b/necsim/plugins/common/src/event_counter.rs @@ -38,7 +38,7 @@ impl fmt::Debug for EventCounterReporter { &(self.late_dispersal_coalescence - self.late_coalescence), ) .field("late_coalescence", &self.late_coalescence) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/common/src/execution_time.rs b/necsim/plugins/common/src/execution_time.rs index ce4f19d5c..5c98930fa 100644 --- a/necsim/plugins/common/src/execution_time.rs +++ b/necsim/plugins/common/src/execution_time.rs @@ -26,7 +26,7 @@ impl fmt::Debug for ExecutionTimeReporter { .as_ref() .map(|time| time.duration_since(self.init_time)), ) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/common/src/progress.rs b/necsim/plugins/common/src/progress.rs index 1467a7335..a5a55c19f 100644 --- a/necsim/plugins/common/src/progress.rs +++ b/necsim/plugins/common/src/progress.rs @@ -39,7 +39,7 @@ impl fmt::Debug for ProgressReporter { fmt.debug_struct(stringify!(ProgressReporter)) .field("progress", &Progress(total - remaining, total)) - .finish() + .finish_non_exhaustive() } } @@ -94,7 +94,7 @@ impl Reporter for ProgressReporter { thread::sleep(Duration::from_millis(100)); match receiver.try_recv() { - Ok(_) | Err(TryRecvError::Disconnected) => break, + Ok(()) | Err(TryRecvError::Disconnected) => break, Err(TryRecvError::Empty) => {}, } diff --git a/necsim/plugins/core/src/export.rs b/necsim/plugins/core/src/export.rs index 7bf2eb90b..25218b5a8 100644 --- a/necsim/plugins/core/src/export.rs +++ b/necsim/plugins/core/src/export.rs @@ -13,16 +13,20 @@ pub struct ReporterPluginDeclaration { pub rustc_version: &'static str, pub core_version: &'static str, + #[allow(improper_ctypes_definitions)] pub init: unsafe extern "C" fn(&'static dyn log::Log, log::LevelFilter), + #[allow(improper_ctypes_definitions)] pub deserialise: unsafe extern "C" fn( &mut dyn erased_serde::Deserializer, ) -> Result, erased_serde::Error>, + #[allow(improper_ctypes_definitions)] pub library_path: unsafe extern "C" fn() -> Option<::std::path::PathBuf>, + #[allow(improper_ctypes_definitions)] pub drop: unsafe extern "C" fn(ManuallyDrop), } diff --git a/necsim/plugins/core/src/import/combinator.rs b/necsim/plugins/core/src/import/combinator.rs index d2cadd6cf..d948c5e3e 100644 --- a/necsim/plugins/core/src/import/combinator.rs +++ b/necsim/plugins/core/src/import/combinator.rs @@ -289,7 +289,7 @@ impl Serialize for AnyReporterPluginVec { let mut plugin_libraries = Vec::new(); - for reporter_plugin in plugins.iter() { + for reporter_plugin in plugins { if let Some(previous_library) = previous_library { if previous_library != reporter_plugin.library.path { plugin_libraries.push(Plugin { diff --git a/necsim/plugins/csv/src/lib.rs b/necsim/plugins/csv/src/lib.rs index eee2b98c4..a459560f2 100644 --- a/necsim/plugins/csv/src/lib.rs +++ b/necsim/plugins/csv/src/lib.rs @@ -29,7 +29,7 @@ impl fmt::Debug for CsvReporter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(stringify!(CsvReporter)) .field("output", &self.output) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/metacommunity/src/lib.rs b/necsim/plugins/metacommunity/src/lib.rs index da85ce27c..880161551 100644 --- a/necsim/plugins/metacommunity/src/lib.rs +++ b/necsim/plugins/metacommunity/src/lib.rs @@ -31,7 +31,7 @@ impl fmt::Debug for MetacommunityMigrationReporter { .field("metacommunity", &self.metacommunity) .field("seed", &self.seed) .field("migrations", &self.migrations) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/species/src/identity.rs b/necsim/plugins/species/src/identity.rs index 21e069cbd..d6aa2b7bc 100644 --- a/necsim/plugins/species/src/identity.rs +++ b/necsim/plugins/species/src/identity.rs @@ -76,7 +76,7 @@ impl SpeciesIdentity { let origin = IndexedLocation::new(Location::new(x, y), i); let Ok(time) = PositiveF64::new(f64::from_bits(time)) else { - return Err(self) + return Err(self); }; Ok((origin, time)) diff --git a/necsim/plugins/species/src/individual/feather/dataframe.rs b/necsim/plugins/species/src/individual/feather/dataframe.rs index 52c56b364..e817b9fb3 100644 --- a/necsim/plugins/species/src/individual/feather/dataframe.rs +++ b/necsim/plugins/species/src/individual/feather/dataframe.rs @@ -92,7 +92,7 @@ impl IndividualSpeciesFeatherReporter { last_dispersal_event: self.last_dispersal_event.clone(), } .into_string() - .map_err(|_| { + .map_err(|()| { std::io::Error::new( std::io::ErrorKind::Other, "failed to write metadata to species dataframe", diff --git a/necsim/plugins/species/src/individual/feather/mod.rs b/necsim/plugins/species/src/individual/feather/mod.rs index 35cf5ad7e..636196d8a 100644 --- a/necsim/plugins/species/src/individual/feather/mod.rs +++ b/necsim/plugins/species/src/individual/feather/mod.rs @@ -50,7 +50,7 @@ impl fmt::Debug for IndividualSpeciesFeatherReporter { fmt.debug_struct(stringify!(IndividualSpeciesFeatherReporter)) .field("output", &self.output) .field("mode", &self.mode) - .finish() + .finish_non_exhaustive() } } @@ -103,7 +103,7 @@ impl<'de> Deserialize<'de> for IndividualSpeciesFeatherReporter { } let last_event = match metadata.schema.metadata.get("last-event") { - Some(last_event) => LastEventState::from_string(last_event).map_err(|_| { + Some(last_event) => LastEventState::from_string(last_event).map_err(|()| { serde::de::Error::custom("invalid resume metadata in species dataframe") })?, None => { @@ -123,37 +123,37 @@ impl<'de> Deserialize<'de> for IndividualSpeciesFeatherReporter { let [ids, xs, ys, is, parents, species] = chunk.columns() else { return Err(serde::de::Error::custom( "corrupted species dataframe schema", - )) + )); }; let Some(ids) = ids.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe id column", - )) + )); }; let Some(xs) = xs.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe x column", - )) + )); }; let Some(ys) = ys.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe y column", - )) + )); }; let Some(is) = is.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe i column", - )) + )); }; let Some(parents) = parents.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe parent column", - )) + )); }; let species = match species.as_any().downcast_ref::() { diff --git a/necsim/plugins/species/src/individual/sqlite/database.rs b/necsim/plugins/species/src/individual/sqlite/database.rs index 804886383..d472111eb 100644 --- a/necsim/plugins/species/src/individual/sqlite/database.rs +++ b/necsim/plugins/species/src/individual/sqlite/database.rs @@ -71,9 +71,8 @@ impl IndividualSpeciesSQLiteReporter { // Create the species locations table in `Create` mode if let SpeciesLocationsMode::Create = self.mode { - self.connection - .execute_batch(&format!( - "CREATE TABLE {} ( + self.connection.execute_batch(&format!( + "CREATE TABLE {} ( id INTEGER PRIMARY KEY NOT NULL, x INTEGER NOT NULL, y INTEGER NOT NULL, @@ -85,9 +84,8 @@ impl IndividualSpeciesSQLiteReporter { key TEXT PRIMARY KEY NOT NULL, value TEXT NOT NULL );", - self.table, - )) - .map(|_| ())?; + self.table, + ))?; } let mut schema: Vec> = Vec::new(); @@ -297,7 +295,7 @@ impl IndividualSpeciesSQLiteReporter { last_parent_prior_time, last_speciation_event, last_dispersal_event, - } = LastEventState::from_string(&last_event).map_err(|_| { + } = LastEventState::from_string(&last_event).map_err(|()| { rusqlite::Error::SqliteFailure( rusqlite::ffi::Error { code: rusqlite::ffi::ErrorCode::TypeMismatch, @@ -369,7 +367,7 @@ impl IndividualSpeciesSQLiteReporter { last_dispersal_event: self.last_dispersal_event, } .into_string() - .map_err(|_| { + .map_err(|()| { rusqlite::Error::SqliteFailure( rusqlite::ffi::Error { code: rusqlite::ffi::ErrorCode::TypeMismatch, diff --git a/necsim/plugins/species/src/individual/sqlite/mod.rs b/necsim/plugins/species/src/individual/sqlite/mod.rs index 904173a9e..de16b552b 100644 --- a/necsim/plugins/species/src/individual/sqlite/mod.rs +++ b/necsim/plugins/species/src/individual/sqlite/mod.rs @@ -44,7 +44,7 @@ impl fmt::Debug for IndividualSpeciesSQLiteReporter { .field("table", &self.table) .field("mode", &self.mode) .field("cache", &self.cache) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/species/src/location/feather/dataframe.rs b/necsim/plugins/species/src/location/feather/dataframe.rs index d4b7878dc..653472f6d 100644 --- a/necsim/plugins/species/src/location/feather/dataframe.rs +++ b/necsim/plugins/species/src/location/feather/dataframe.rs @@ -98,7 +98,7 @@ impl LocationSpeciesFeatherReporter { last_dispersal_event: self.last_dispersal_event.clone(), } .into_string() - .map_err(|_| { + .map_err(|()| { std::io::Error::new( std::io::ErrorKind::Other, "failed to write metadata to species dataframe", diff --git a/necsim/plugins/species/src/location/feather/mod.rs b/necsim/plugins/species/src/location/feather/mod.rs index 1997c6669..106c4f37f 100644 --- a/necsim/plugins/species/src/location/feather/mod.rs +++ b/necsim/plugins/species/src/location/feather/mod.rs @@ -63,7 +63,7 @@ impl fmt::Debug for LocationSpeciesFeatherReporter { &SpeciesDeduplicationMode::from(self.deduplication_probability), ) .field("mode", &self.mode) - .finish() + .finish_non_exhaustive() } } @@ -118,7 +118,7 @@ impl<'de> Deserialize<'de> for LocationSpeciesFeatherReporter { } let last_event = match metadata.schema.metadata.get("last-event") { - Some(last_event) => LastEventState::from_string(last_event).map_err(|_| { + Some(last_event) => LastEventState::from_string(last_event).map_err(|()| { serde::de::Error::custom("invalid resume metadata in species dataframe") })?, None => { @@ -138,19 +138,19 @@ impl<'de> Deserialize<'de> for LocationSpeciesFeatherReporter { let [xs, ys, species, counts] = chunk.columns() else { return Err(serde::de::Error::custom( "corrupted species dataframe schema", - )) + )); }; let Some(xs) = xs.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe x column", - )) + )); }; let Some(ys) = ys.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe y column", - )) + )); }; let species = match species.as_any().downcast_ref::() { @@ -165,7 +165,7 @@ impl<'de> Deserialize<'de> for LocationSpeciesFeatherReporter { let Some(counts) = counts.as_any().downcast_ref::>() else { return Err(serde::de::Error::custom( "corrupted species dataframe count column", - )) + )); }; for (((x, y), species), count) in xs diff --git a/necsim/plugins/species/src/state.rs b/necsim/plugins/species/src/state.rs index 50a4863b6..08c7fa185 100644 --- a/necsim/plugins/species/src/state.rs +++ b/necsim/plugins/species/src/state.rs @@ -7,7 +7,7 @@ use necsim_core::{ }; use necsim_core_bond::NonNegativeF64; -#[allow(clippy::module_name_repetitions)] +#[allow(clippy::module_name_repetitions, clippy::struct_field_names)] #[derive(Serialize, Deserialize)] pub struct LastEventState { pub last_parent_prior_time: Option<(GlobalLineageReference, NonNegativeF64)>, diff --git a/necsim/plugins/statistics/src/coverage.rs b/necsim/plugins/statistics/src/coverage.rs index e69f0da1a..b40bbca5d 100644 --- a/necsim/plugins/statistics/src/coverage.rs +++ b/necsim/plugins/statistics/src/coverage.rs @@ -24,7 +24,7 @@ impl fmt::Debug for GlobalCoverageReporter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(stringify!(GlobalCoverageReporter)) .field("output", &self.output) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/statistics/src/speciation.rs b/necsim/plugins/statistics/src/speciation.rs index d35f387c4..e2c7fc9ff 100644 --- a/necsim/plugins/statistics/src/speciation.rs +++ b/necsim/plugins/statistics/src/speciation.rs @@ -24,7 +24,7 @@ impl fmt::Debug for GlobalSpeciationReporter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(stringify!(GlobalSpeciationReporter)) .field("output", &self.output) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/statistics/src/turnover.rs b/necsim/plugins/statistics/src/turnover.rs index 903223034..9d6cd106d 100644 --- a/necsim/plugins/statistics/src/turnover.rs +++ b/necsim/plugins/statistics/src/turnover.rs @@ -29,7 +29,7 @@ impl fmt::Debug for GlobalTurnoverReporter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(stringify!(GlobalTurnoverReporter)) .field("output", &self.output) - .finish() + .finish_non_exhaustive() } } diff --git a/necsim/plugins/tskit/src/tree/mod.rs b/necsim/plugins/tskit/src/tree/mod.rs index c4d9b1acc..852caffcc 100644 --- a/necsim/plugins/tskit/src/tree/mod.rs +++ b/necsim/plugins/tskit/src/tree/mod.rs @@ -58,7 +58,7 @@ impl fmt::Debug for TskitTreeReporter { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct("TskitTreeReporter") .field("output", &self.output) - .finish() + .finish_non_exhaustive() } } diff --git a/rust-toolchain b/rust-toolchain index 691f2fa36..3ab928278 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-04-19" +channel = "nightly-2023-11-10" components = [ "cargo", "rustfmt", "clippy", "rust-src" ] targets = [ "x86_64-unknown-linux-gnu", "nvptx64-nvidia-cuda" ] diff --git a/rustcoalescence/algorithms/cuda/Cargo.toml b/rustcoalescence/algorithms/cuda/Cargo.toml index c014fdd0b..123f29eae 100644 --- a/rustcoalescence/algorithms/cuda/Cargo.toml +++ b/rustcoalescence/algorithms/cuda/Cargo.toml @@ -23,4 +23,4 @@ thiserror = "1.0" serde = { version = "1.0", features = ["derive"] } serde_state = "0.4" serde_derive_state = "0.4" -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["host"] } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["host"] } diff --git a/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml b/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml index b2d7e69e9..e05699ee9 100644 --- a/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml +++ b/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml @@ -14,4 +14,4 @@ necsim-impls-no-std = { path = "../../../../necsim/impls/no-std", features = ["c necsim-impls-cuda = { path = "../../../../necsim/impls/cuda" } rustcoalescence-algorithms-cuda-gpu-kernel = { path = "../gpu-kernel" } -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["host"] } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["host"] } diff --git a/rustcoalescence/algorithms/cuda/cpu-kernel/src/lib.rs b/rustcoalescence/algorithms/cuda/cpu-kernel/src/lib.rs index 5436bea05..39240fe34 100644 --- a/rustcoalescence/algorithms/cuda/cpu-kernel/src/lib.rs +++ b/rustcoalescence/algorithms/cuda/cpu-kernel/src/lib.rs @@ -1,6 +1,4 @@ #![deny(clippy::pedantic)] -#![feature(const_eval_limit)] -#![const_eval_limit = "1000000000000"] #![allow(incomplete_features)] #![feature(specialization)] diff --git a/rustcoalescence/algorithms/cuda/gpu-kernel/Cargo.toml b/rustcoalescence/algorithms/cuda/gpu-kernel/Cargo.toml index 7c4e59bcd..2e450888f 100644 --- a/rustcoalescence/algorithms/cuda/gpu-kernel/Cargo.toml +++ b/rustcoalescence/algorithms/cuda/gpu-kernel/Cargo.toml @@ -16,4 +16,4 @@ necsim-core-bond = { path = "../../../../necsim/core/bond" } necsim-impls-no-std = { path = "../../../../necsim/impls/no-std", features = ["cuda"] } necsim-impls-cuda = { path = "../../../../necsim/impls/cuda" } -rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "5d5cd02", features = ["derive"] } +rust-cuda = { git = "https://github.com/juntyr/rust-cuda", rev = "b26635f", features = ["derive"] } diff --git a/rustcoalescence/algorithms/cuda/gpu-kernel/src/lib.rs b/rustcoalescence/algorithms/cuda/gpu-kernel/src/lib.rs index 53299dc7b..1bfa9826c 100644 --- a/rustcoalescence/algorithms/cuda/gpu-kernel/src/lib.rs +++ b/rustcoalescence/algorithms/cuda/gpu-kernel/src/lib.rs @@ -1,7 +1,5 @@ #![deny(clippy::pedantic)] #![no_std] -#![feature(const_eval_limit)] -#![const_eval_limit = "1000000000000"] #![cfg_attr(target_os = "cuda", feature(abi_ptx))] #![cfg_attr(target_os = "cuda", feature(alloc_error_handler))] #![cfg_attr(target_os = "cuda", feature(panic_info_message))] diff --git a/rustcoalescence/algorithms/gillespie/src/event_skipping/initialiser/fixup.rs b/rustcoalescence/algorithms/gillespie/src/event_skipping/initialiser/fixup.rs index fcd0f20a2..d6d0518b2 100644 --- a/rustcoalescence/algorithms/gillespie/src/event_skipping/initialiser/fixup.rs +++ b/rustcoalescence/algorithms/gillespie/src/event_skipping/initialiser/fixup.rs @@ -209,7 +209,7 @@ where .extend(out_of_deme.into_iter().map(ExceptionalLineage::OutOfDeme)); }, OutOfDemeStrategy::Dispersal => { - fixable_lineages.extend(out_of_deme.into_iter()); + fixable_lineages.extend(out_of_deme); }, } @@ -222,7 +222,7 @@ where ); }, OutOfHabitatStrategy::UniformDispersal => { - fixable_lineages.extend(out_of_habitat.into_iter()); + fixable_lineages.extend(out_of_habitat); }, } diff --git a/rustcoalescence/algorithms/gillespie/src/gillespie/classical/initialiser/fixup.rs b/rustcoalescence/algorithms/gillespie/src/gillespie/classical/initialiser/fixup.rs index 5e6f21e03..9a6644be8 100644 --- a/rustcoalescence/algorithms/gillespie/src/gillespie/classical/initialiser/fixup.rs +++ b/rustcoalescence/algorithms/gillespie/src/gillespie/classical/initialiser/fixup.rs @@ -167,7 +167,7 @@ impl, M: MathsCore, G: RngCore, O: Scena .extend(out_of_deme.into_iter().map(ExceptionalLineage::OutOfDeme)); }, OutOfDemeStrategy::Dispersal => { - fixable_lineages.extend(out_of_deme.into_iter()); + fixable_lineages.extend(out_of_deme); }, } @@ -180,7 +180,7 @@ impl, M: MathsCore, G: RngCore, O: Scena ); }, OutOfHabitatStrategy::UniformDispersal => { - fixable_lineages.extend(out_of_habitat.into_iter()); + fixable_lineages.extend(out_of_habitat); }, } diff --git a/rustcoalescence/algorithms/gillespie/src/gillespie/turnover/initialiser/fixup.rs b/rustcoalescence/algorithms/gillespie/src/gillespie/turnover/initialiser/fixup.rs index 66243468d..ae0df9263 100644 --- a/rustcoalescence/algorithms/gillespie/src/gillespie/turnover/initialiser/fixup.rs +++ b/rustcoalescence/algorithms/gillespie/src/gillespie/turnover/initialiser/fixup.rs @@ -186,7 +186,7 @@ impl, M: MathsCore, G: RngCore, O: Scena .extend(out_of_deme.into_iter().map(ExceptionalLineage::OutOfDeme)); }, OutOfDemeStrategy::Dispersal => { - fixable_lineages.extend(out_of_deme.into_iter()); + fixable_lineages.extend(out_of_deme); }, } @@ -199,7 +199,7 @@ impl, M: MathsCore, G: RngCore, O: Scena ); }, OutOfHabitatStrategy::UniformDispersal => { - fixable_lineages.extend(out_of_habitat.into_iter()); + fixable_lineages.extend(out_of_habitat); }, } diff --git a/rustcoalescence/algorithms/independent/src/initialiser/fixup.rs b/rustcoalescence/algorithms/independent/src/initialiser/fixup.rs index 8ed395c40..1783d6af5 100644 --- a/rustcoalescence/algorithms/independent/src/initialiser/fixup.rs +++ b/rustcoalescence/algorithms/independent/src/initialiser/fixup.rs @@ -111,7 +111,7 @@ impl, M: MathsCore, G: PrimeableRng, O: .extend(out_of_deme.into_iter().map(ExceptionalLineage::OutOfDeme)); }, OutOfDemeStrategy::Dispersal => { - fixable_lineages.extend(out_of_deme.into_iter()); + fixable_lineages.extend(out_of_deme); }, } @@ -124,7 +124,7 @@ impl, M: MathsCore, G: PrimeableRng, O: ); }, OutOfHabitatStrategy::UniformDispersal => { - fixable_lineages.extend(out_of_habitat.into_iter()); + fixable_lineages.extend(out_of_habitat); }, } diff --git a/rustcoalescence/algorithms/independent/src/launch.rs b/rustcoalescence/algorithms/independent/src/launch.rs index a16586f88..6841c2f55 100644 --- a/rustcoalescence/algorithms/independent/src/launch.rs +++ b/rustcoalescence/algorithms/independent/src/launch.rs @@ -152,10 +152,7 @@ pub fn initialise_and_simulate< Status::Paused => Ok(SimulationOutcome::Paused { time, steps, - lineages: lineages - .into_iter() - .chain(passthrough.into_iter()) - .collect(), + lineages: lineages.into_iter().chain(passthrough).collect(), rng: simulation.rng_mut().clone(), marker: PhantomData::, }), diff --git a/rustcoalescence/src/args/cli/replay.rs b/rustcoalescence/src/args/cli/replay.rs index 0e2e619e0..5b650149d 100644 --- a/rustcoalescence/src/args/cli/replay.rs +++ b/rustcoalescence/src/args/cli/replay.rs @@ -76,7 +76,7 @@ impl<'de> Deserialize<'de> for ReplayArgs { }; match (valid, mode) { - (Ok(_), _) => Ok(Self { + (Ok(()), _) => Ok(Self { event_log, mode, reporters,