Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8c6e722

Browse filesBrowse files
committed
Upgraded to Rust 1.68 + latest dependencies
1 parent 40cfd8c commit 8c6e722
Copy full SHA for 8c6e722

File tree

Expand file treeCollapse file tree

23 files changed

+301
-302
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

23 files changed

+301
-302
lines changed
Open diff view settings
Collapse file

‎Cargo.lock‎

Copy file name to clipboardExpand all lines: Cargo.lock
+209-144Lines changed: 209 additions & 144 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎necsim/impls/no-std/src/cogs/dispersal_sampler/in_memory/cumulative/dispersal.rs‎

Copy file name to clipboardExpand all lines: necsim/impls/no-std/src/cogs/dispersal_sampler/in_memory/cumulative/dispersal.rs
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>> DispersalSampler<M, H, G>
4040
// Sampling the cumulative probability table using binary search can return
4141
// non-habitat locations. We correct for this by storing the index of the
4242
// last valid habitat (the alias method will make this obsolete).
43-
let valid_dispersal_target_index = match self
43+
let Some(Some(valid_dispersal_target_index)) = self
4444
.valid_dispersal_targets
45-
.get(location_index * habitat_area + dispersal_target_index)
46-
{
47-
Some(Some(valid_dispersal_target_index)) => valid_dispersal_target_index,
48-
_ => unreachable!("habitat dispersal origin must disperse somewhere"),
45+
.get(location_index * habitat_area + dispersal_target_index).copied()
46+
else {
47+
unreachable!("habitat dispersal origin must disperse somewhere")
4948
};
5049

5150
#[allow(clippy::cast_possible_truncation)]
Collapse file

‎necsim/impls/no-std/src/cogs/habitat/in_memory.rs‎

Copy file name to clipboardExpand all lines: necsim/impls/no-std/src/cogs/habitat/in_memory.rs
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,11 @@ impl<M: MathsCore> InMemoryHabitat<M> {
141141
old(habitat.num_rows()) == usize::from(ret.get_extent().height())
142142
} else { true }, "habitat extent has the dimension of the habitat array")]
143143
pub fn try_new(habitat: Array2D<u32>) -> Option<Self> {
144-
let width = match OffByOneU32::new(habitat.num_columns() as u64) {
145-
Ok(width) => width,
146-
Err(_) => return None,
144+
let Ok(width) = OffByOneU32::new(habitat.num_columns() as u64) else {
145+
return None
147146
};
148-
let height = match OffByOneU32::new(habitat.num_rows() as u64) {
149-
Ok(height) => height,
150-
Err(_) => return None,
147+
let Ok(height) = OffByOneU32::new(habitat.num_rows() as u64) else {
148+
return None
151149
};
152150

153151
let habitat = habitat.into_row_major().into_boxed_slice();
Collapse file

‎necsim/impls/std/src/event_log/replay/mod.rs‎

Copy file name to clipboardExpand all lines: necsim/impls/std/src/event_log/replay/mod.rs
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ impl FromIterator<SortedSegment> for anyhow::Result<EventLogReplay> {
130130
}
131131
}
132132

133-
let min_index = if let Some(min_index) = min_index {
134-
min_index
135-
} else {
133+
let Some(min_index) = min_index else {
136134
if !current_group.is_empty() {
137135
grouped_segments.push(current_group);
138136
current_group = Vec::new();
Collapse file

‎necsim/impls/std/src/event_log/replay/sorted_segments.rs‎

Copy file name to clipboardExpand all lines: necsim/impls/std/src/event_log/replay/sorted_segments.rs
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ impl Iterator for SortedSortedSegments {
6565
let next = std::mem::replace(
6666
&mut self.next,
6767
loop {
68-
let next_segment = match self.segments.last_mut() {
69-
Some(next_segment) => next_segment,
70-
None => break None,
68+
let Some(next_segment) = self.segments.last_mut() else {
69+
break None
7170
};
7271

7372
if let Some(next_event) = next_segment.next() {
Collapse file

‎necsim/partitioning/mpi/src/lib.rs‎

Copy file name to clipboardExpand all lines: necsim/partitioning/mpi/src/lib.rs
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,8 @@ impl Partitioning for MpiPartitioning {
183183
event_log: Self::Auxiliary,
184184
inner: F,
185185
) -> anyhow::Result<Q> {
186-
let event_log = match event_log {
187-
Some(event_log) => event_log,
188-
None => anyhow::bail!(MpiLocalPartitionError::MissingEventLog),
186+
let Some(event_log) = event_log else {
187+
anyhow::bail!(MpiLocalPartitionError::MissingEventLog)
189188
};
190189

191190
let mut directory = event_log.directory().to_owned();
@@ -280,8 +279,7 @@ fn deserialize_state_mpi_world<'de, D: Deserializer<'de>>(
280279
None => Ok(None),
281280
Some(world) if world == *mpi_world => Ok(Some(world)),
282281
Some(_) => Err(serde::de::Error::custom(format!(
283-
"mismatch with MPI world size of {}",
284-
mpi_world
282+
"mismatch with MPI world size of {mpi_world}"
285283
))),
286284
}
287285
}
Collapse file

‎necsim/plugins/core/Cargo.toml‎

Copy file name to clipboardExpand all lines: necsim/plugins/core/Cargo.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ log = "0.4"
1919
serde = { version = "1.0", features = ["derive"] }
2020
erased-serde = "0.3"
2121

22-
libloading = { version = "0.7", optional = true }
22+
libloading = { version = "0.8", optional = true }
2323
process_path = { version = "0.1", optional = true }
2424

2525
[build-dependencies]
Collapse file

‎necsim/plugins/core/build.rs‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
22
let version = rustc_version::version().unwrap();
33

4-
println!("cargo:rustc-env=RUSTC_VERSION={}", version);
4+
println!("cargo:rustc-env=RUSTC_VERSION={version}");
55
}
Collapse file

‎necsim/plugins/species/Cargo.toml‎

Copy file name to clipboardExpand all lines: necsim/plugins/species/Cargo.toml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ necsim-plugins-core = { path = "../core", features = ["export"] }
1717

1818
serde = { version = "1.0", features = ["derive"] }
1919
log = { version = "0.4" }
20-
rusqlite = "0.28"
20+
rusqlite = "0.29"
2121
fnv = "1.0"
2222
base32 = "0.4"
2323
hex = "0.4"
2424
bincode = "1.3"
25-
arrow2 = { version = "0.16", features = ["io_ipc"] }
25+
arrow2 = { version = "0.17", features = ["io_ipc"] }
2626

2727
[dev-dependencies]
2828
rand = "0.8"
Collapse file

‎necsim/plugins/species/src/identity.rs‎

Copy file name to clipboardExpand all lines: necsim/plugins/species/src/identity.rs
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ impl SpeciesIdentity {
7575

7676
let origin = IndexedLocation::new(Location::new(x, y), i);
7777

78-
let time = match PositiveF64::new(f64::from_bits(time)) {
79-
Ok(time) => time,
80-
Err(_) => return Err(self),
78+
let Ok(time) = PositiveF64::new(f64::from_bits(time)) else {
79+
return Err(self)
8180
};
8281

8382
Ok((origin, time))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.