Skip to content

Commit

Permalink
Update rust to 1.71.0 (#4718)
Browse files Browse the repository at this point in the history
Co-authored-by: Joonas Koivunen <[email protected]>
  • Loading branch information
vadim2404 and koivunej authored Jul 14, 2023
1 parent 1309571 commit e767ced
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
18 changes: 9 additions & 9 deletions libs/pq_proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,15 @@ impl<'a> BeMessage<'a> {
}
}

fn terminate_code(code: &[u8; 5]) -> [u8; 6] {
let mut terminated = [0; 6];
for (i, &elem) in code.iter().enumerate() {
terminated[i] = elem;
}

terminated
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down Expand Up @@ -965,12 +974,3 @@ mod tests {
assert_eq!(split_options(&params), ["foo bar", " \\", "baz ", "lol"]);
}
}

fn terminate_code(code: &[u8; 5]) -> [u8; 6] {
let mut terminated = [0; 6];
for (i, &elem) in code.iter().enumerate() {
terminated[i] = elem;
}

terminated
}
5 changes: 1 addition & 4 deletions libs/remote_storage/src/local_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ impl RemoteStorage for LocalFs {
let mut files = vec![];
let mut directory_queue = vec![full_path.clone()];

while !directory_queue.is_empty() {
let cur_folder = directory_queue
.pop()
.expect("queue cannot be empty: we just checked");
while let Some(cur_folder) = directory_queue.pop() {
let mut entries = fs::read_dir(cur_folder.clone()).await?;
while let Some(entry) = entries.next_entry().await? {
let file_name: PathBuf = entry.file_name().into();
Expand Down
3 changes: 1 addition & 2 deletions pageserver/src/tenant/layer_map/historic_layer_coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ impl<Value: Clone> HistoricLayerCoverage<Value> {
self.head = self
.historic
.iter()
.rev()
.next()
.next_back()
.map(|(_, v)| v.clone())
.unwrap_or_default();
}
Expand Down
3 changes: 1 addition & 2 deletions pageserver/src/tenant/layer_map/layer_coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ impl<Value: Clone> LayerCoverage<Value> {
pub fn query(&self, key: i128) -> Option<Value> {
self.nodes
.range(..=key)
.rev()
.next()?
.next_back()?
.1
.as_ref()
.map(|(_, v)| v.clone())
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.70.0"
channel = "1.71.0"
profile = "default"
# The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy.
# https://rust-lang.github.io/rustup/concepts/profiles.html
Expand Down

1 comment on commit e767ced

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1100 tests run: 1043 passed, 0 failed, 57 skipped (full report)


Please sign in to comment.