Skip to content

Commit 4ae37a4

Browse files
Jonathan Woollett-Lightpb8o
Jonathan Woollett-Light
authored andcommitted
Update Rust 1.65.0
Signed-off-by: Jonathan Woollett-Light <[email protected]>
1 parent f79c94d commit 4ae37a4

File tree

12 files changed

+222
-220
lines changed

12 files changed

+222
-220
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::process::Command;
77
// embedding the FIRECRACKER_VERSION directly in the resulting binary
88
fn main() {
99
let firecracker_version = Command::new("git")
10-
.args(&["describe", "--dirty"])
10+
.args(["describe", "--dirty"])
1111
.output()
1212
.ok()
1313
.and_then(|output| {

src/devices/src/virtio/balloon/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ pub(crate) mod tests {
686686
assert_eq!(balloon.device_type(), TYPE_BALLOON);
687687

688688
let features: u64 = (1u64 << VIRTIO_F_VERSION_1)
689-
| ((if *deflate_on_oom { 1 } else { 0 }) << VIRTIO_BALLOON_F_DEFLATE_ON_OOM)
689+
| (u64::from(*deflate_on_oom) << VIRTIO_BALLOON_F_DEFLATE_ON_OOM)
690690
| ((u64::from(*stats_interval)) << VIRTIO_BALLOON_F_STATS_VQ);
691691

692692
assert_eq!(balloon.avail_features_by_page(0), features as u32);

src/devices/src/virtio/block/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ pub(crate) mod tests {
16521652
let mut block = default_block(default_engine_type_for_kv());
16531653
let f = TempFile::new().unwrap();
16541654
let path = f.as_path();
1655-
let mdata = metadata(&path).unwrap();
1655+
let mdata = metadata(path).unwrap();
16561656
let mut id = vec![0; VIRTIO_BLK_ID_BYTES as usize];
16571657
let str_id = format!("{}{}{}", mdata.st_dev(), mdata.st_rdev(), mdata.st_ino());
16581658
let part_id = str_id.as_bytes();

src/jailer/src/cgroup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ impl CgroupV2 {
338338
}
339339
};
340340

341-
Self::write_all_subtree_control(&parent, controller)?;
341+
Self::write_all_subtree_control(parent, controller)?;
342342
writeln_special(&cg_subtree_ctrl, format!("+{}", &controller))
343343
}
344344

@@ -399,7 +399,7 @@ impl Cgroup for CgroupV2 {
399399
// Ok to unwrap since the path was just created.
400400
let parent = location.parent().unwrap();
401401
// Enable the controller in all parent directories
402-
CgroupV2::write_all_subtree_control(&parent, controller)?;
402+
CgroupV2::write_all_subtree_control(parent, controller)?;
403403

404404
location.push(&self.0.file);
405405
writeln_special(location, &self.0.value)?;

src/jailer/src/env.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Env {
125125
let chroot_base = arguments
126126
.single_value("chroot-base-dir")
127127
.ok_or_else(|| Error::ArgumentParsing(MissingValue("chroot-base-dir".to_string())))?;
128-
let mut chroot_dir = canonicalize(&chroot_base)
128+
let mut chroot_dir = canonicalize(chroot_base)
129129
.map_err(|err| Error::Canonicalize(PathBuf::from(&chroot_base), err))?;
130130

131131
if !chroot_dir.is_dir() {
@@ -412,10 +412,10 @@ impl Env {
412412

413413
fn exec_command(&self, chroot_exec_file: PathBuf) -> io::Error {
414414
Command::new(chroot_exec_file)
415-
.args(&["--id", &self.id])
416-
.args(&["--start-time-us", &self.start_time_us.to_string()])
417-
.args(&["--start-time-cpu-us", &self.start_time_cpu_us.to_string()])
418-
.args(&["--parent-cpu-time-us", &self.jailer_cpu_time_us.to_string()])
415+
.args(["--id", &self.id])
416+
.args(["--start-time-us", &self.start_time_us.to_string()])
417+
.args(["--start-time-cpu-us", &self.start_time_cpu_us.to_string()])
418+
.args(["--parent-cpu-time-us", &self.jailer_cpu_time_us.to_string()])
419419
.stdin(Stdio::inherit())
420420
.stdout(Stdio::inherit())
421421
.stderr(Stdio::inherit())
@@ -467,8 +467,8 @@ impl Env {
467467
// We now read the contents of the current directory and copy the files we are
468468
// interested in to the destination path.
469469
for entry in FOLDER_HIERARCHY.iter() {
470-
let host_cache_file = host_path.join(&entry);
471-
let jailer_cache_file = jailer_path.join(&entry);
470+
let host_cache_file = host_path.join(entry);
471+
let jailer_cache_file = jailer_path.join(entry);
472472

473473
let line = readln_special(&host_cache_file)?;
474474
writeln_special(&jailer_cache_file, line)?;
@@ -557,7 +557,7 @@ impl Env {
557557
// for all of them.
558558
FOLDER_HIERARCHY
559559
.iter()
560-
.try_for_each(|f| self.setup_jailed_folder(*f))?;
560+
.try_for_each(|f| self.setup_jailed_folder(f))?;
561561

562562
// Here we are creating the /dev/kvm and /dev/net/tun devices inside the jailer.
563563
// Following commands can be translated into bash like this:
@@ -1179,7 +1179,7 @@ mod tests {
11791179
assert_eq!(
11801180
format!(
11811181
"{:?}",
1182-
Env::parse_resource_limits(&mut resource_limits, &*arg)
1182+
Env::parse_resource_limits(&mut resource_limits, &arg)
11831183
.err()
11841184
.unwrap()
11851185
),
@@ -1194,7 +1194,7 @@ mod tests {
11941194
assert_eq!(
11951195
format!(
11961196
"{:?}",
1197-
Env::parse_resource_limits(&mut resource_limits, &*vec![arg])
1197+
Env::parse_resource_limits(&mut resource_limits, &[arg])
11981198
.err()
11991199
.unwrap()
12001200
),
@@ -1209,7 +1209,7 @@ mod tests {
12091209
assert_eq!(
12101210
format!(
12111211
"{:?}",
1212-
Env::parse_resource_limits(&mut resource_limits, &*vec![arg])
1212+
Env::parse_resource_limits(&mut resource_limits, &[arg])
12131213
.err()
12141214
.unwrap()
12151215
),
@@ -1227,7 +1227,7 @@ mod tests {
12271227
let resources = [FSIZE_ARG, NO_FILE_ARG];
12281228
for resource in resources.iter() {
12291229
let arg = vec![resource.to_string() + "=4098"];
1230-
Env::parse_resource_limits(&mut resource_limits, &*arg).unwrap();
1230+
Env::parse_resource_limits(&mut resource_limits, &arg).unwrap();
12311231
}
12321232
}
12331233

src/vmm/src/seccomp_filters/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl SeccompConfig {
7474
} else {
7575
match seccomp_filter {
7676
Some(path) => Ok(SeccompConfig::Custom(Box::new(
77-
File::open(&path).map_err(FilterError::FileOpen)?,
77+
File::open(path).map_err(FilterError::FileOpen)?,
7878
))),
7979
None => Ok(SeccompConfig::Advanced),
8080
}

src/vmm/src/vmm_config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn open_file_nonblock(path: &Path) -> Result<File> {
172172
.custom_flags(O_NONBLOCK)
173173
.read(true)
174174
.write(true)
175-
.open(&path)
175+
.open(path)
176176
}
177177

178178
type FcLineWriter = io::LineWriter<File>;

tests/integration_tests/build/test_coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
if utils.is_io_uring_supported():
2626
COVERAGE_DICT = {"Intel": 82.99, "AMD": 82.31, "ARM": 82.51}
2727
else:
28-
COVERAGE_DICT = {"Intel": 80.15, "AMD": 79.48, "ARM": 79.69}
28+
COVERAGE_DICT = {"Intel": 80.15, "AMD": 79.48, "ARM": 79.59}
2929

3030
PROC_MODEL = proc.proc_type()
3131

tools/devctr/Dockerfile.aarch64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM ubuntu:18.04
44
# The Rust toolchain layer will get updated most frequently, but we could keep the system
55
# dependencies layer intact for much longer.
66

7-
ARG RUST_TOOLCHAIN="1.64.0"
7+
ARG RUST_TOOLCHAIN="1.65.0"
88
ARG TINI_VERSION_TAG="v0.18.0"
99
ARG TMP_BUILD_DIR=/tmp/build
1010
ARG TMP_POETRY_DIR

tools/devctr/Dockerfile.x86_64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM ubuntu:18.04
44
# The Rust toolchain layer will get updated most frequently, but we could keep the system
55
# dependencies layer intact for much longer.
66

7-
ARG RUST_TOOLCHAIN="1.64.0"
7+
ARG RUST_TOOLCHAIN="1.65.0"
88
ARG TINI_VERSION_TAG="v0.18.0"
99
ARG TMP_BUILD_DIR=/tmp/build
1010
ARG TMP_POETRY_DIR

0 commit comments

Comments
 (0)