diff --git a/base/src/sys/windows/events.rs b/base/src/sys/windows/events.rs index 67dc3b1bcd..c3c7ec0599 100644 --- a/base/src/sys/windows/events.rs +++ b/base/src/sys/windows/events.rs @@ -9,7 +9,7 @@ use crate::EventToken; /// Represents descriptor-token pairs which represent an event which can be triggered in the /// EventContext -#[derive(PartialEq)] +#[derive(PartialEq, Eq)] pub struct EventTrigger { pub(crate) token: T, pub(crate) event: RawDescriptor, diff --git a/base/src/sys/windows/named_pipes.rs b/base/src/sys/windows/named_pipes.rs index 6ffa8a66cd..6363ce2f1f 100644 --- a/base/src/sys/windows/named_pipes.rs +++ b/base/src/sys/windows/named_pipes.rs @@ -187,7 +187,7 @@ pub trait ReadOverlapped { fn try_read_result(&mut self, overlapped_wrapper: &mut OverlappedWrapper) -> io::Result; } -#[derive(Serialize, Deserialize, Copy, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Copy, Clone, Debug, PartialEq, Eq)] pub enum FramingMode { Byte, Message, @@ -209,7 +209,7 @@ impl FramingMode { } } -#[derive(Serialize, Deserialize, Copy, Clone, PartialEq, Debug)] +#[derive(Serialize, Deserialize, Copy, Clone, PartialEq, Debug, Eq)] pub enum BlockingMode { /// Calls to read() block until data is received Wait, diff --git a/bit_field/tests/test_enum.rs b/bit_field/tests/test_enum.rs index d3c1be667f..8b00a942be 100644 --- a/bit_field/tests/test_enum.rs +++ b/bit_field/tests/test_enum.rs @@ -5,7 +5,7 @@ use bit_field::*; #[bitfield] -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] enum TwoBits { Zero = 0b00, One = 0b01, @@ -15,7 +15,7 @@ enum TwoBits { #[bitfield] #[bits = 3] -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] enum ThreeBits { Zero = 0b00, One = 0b01, diff --git a/crash_report/src/noop.rs b/crash_report/src/noop.rs index d05f678945..f97392ce25 100644 --- a/crash_report/src/noop.rs +++ b/crash_report/src/noop.rs @@ -22,7 +22,7 @@ pub enum CrashReportReason { Unknown, } -#[derive(Clone, Copy, Serialize, Deserialize, Debug, PartialEq)] +#[derive(Clone, Copy, Serialize, Deserialize, Debug, PartialEq, Eq)] enum CrashTubeCommand { UploadCrashReport(CrashReportReason), } diff --git a/cros_async/src/sys/windows/wait_for_handle.rs b/cros_async/src/sys/windows/wait_for_handle.rs index 4fc2ff5320..86684c0b30 100644 --- a/cros_async/src/sys/windows/wait_for_handle.rs +++ b/cros_async/src/sys/windows/wait_for_handle.rs @@ -49,7 +49,7 @@ impl WaitForHandleInner { } /// Future's state. -#[derive(Clone, Copy, PartialEq)] +#[derive(Clone, Copy, PartialEq, Eq)] enum WaitState { New, Sleeping, diff --git a/crosvm_cli/src/sys/windows/exit.rs b/crosvm_cli/src/sys/windows/exit.rs index 3d1786d77f..a120447865 100644 --- a/crosvm_cli/src/sys/windows/exit.rs +++ b/crosvm_cli/src/sys/windows/exit.rs @@ -193,7 +193,7 @@ macro_rules! ensure_exit_code { } #[allow(clippy::enum_clike_unportable_variant)] -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum Exit { // Windows process exit codes triggered by the kernel tend to be NTSTATUS, so we treat // our error codes as NTSTATUS to avoid clashing. This means we set the vendor bit. We also diff --git a/devices/src/irqchip/apic.rs b/devices/src/irqchip/apic.rs index b721420b9a..c7b3771f52 100644 --- a/devices/src/irqchip/apic.rs +++ b/devices/src/irqchip/apic.rs @@ -884,7 +884,7 @@ impl Reg { /// interrupt vector. The flags are spread across the first 32 bits of each of eight 16-byte APIC /// register slots. #[repr(usize)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] enum VectorReg { /// In-service register. A bit is set for each interrupt vector currently being serviced by the /// processor. diff --git a/devices/src/pci/coiommu.rs b/devices/src/pci/coiommu.rs index 4e3150d655..9ad2d34755 100644 --- a/devices/src/pci/coiommu.rs +++ b/devices/src/pci/coiommu.rs @@ -210,7 +210,7 @@ struct CoIommuReg { dtt_level: u64, } -#[derive(Default, Debug, Copy, Clone, PartialEq)] +#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)] struct PinnedPageInfo { gfn: u64, unpin_busy_cnt: u64, @@ -225,7 +225,7 @@ impl PinnedPageInfo { } } -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Debug, Eq)] enum UnpinThreadState { Unparked, Parked, @@ -432,7 +432,7 @@ fn pin_page( Ok(()) } -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Debug, Eq)] enum UnpinResult { UnpinlistEmpty, Unpinned, diff --git a/devices/src/usb/xhci/ring_buffer_controller.rs b/devices/src/usb/xhci/ring_buffer_controller.rs index 32082f3c29..32befeacb2 100644 --- a/devices/src/usb/xhci/ring_buffer_controller.rs +++ b/devices/src/usb/xhci/ring_buffer_controller.rs @@ -36,7 +36,7 @@ pub enum Error { type Result = std::result::Result; -#[derive(PartialEq, Copy, Clone)] +#[derive(PartialEq, Copy, Clone, Eq)] enum RingBufferState { /// Running: RingBuffer is running, consuming transfer descriptor. Running, diff --git a/devices/src/vfio.rs b/devices/src/vfio.rs index 40e8f63de6..59ed8c0120 100644 --- a/devices/src/vfio.rs +++ b/devices/src/vfio.rs @@ -146,7 +146,7 @@ enum IommuType { // Hint as to whether IOMMU mappings will tend to be large and static or // small and dynamic. -#[derive(PartialEq)] +#[derive(PartialEq, Eq)] enum IommuMappingHint { Static, Dynamic, diff --git a/devices/src/virtio/gpu/parameters.rs b/devices/src/virtio/gpu/parameters.rs index 187bbc5eca..3158c9fabc 100644 --- a/devices/src/virtio/gpu/parameters.rs +++ b/devices/src/virtio/gpu/parameters.rs @@ -111,7 +111,7 @@ mod tests { #[test] fn context_mask_serialize_deserialize() { - #[derive(Debug, Serialize, Deserialize, PartialEq)] + #[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] struct ContextMask { #[serde(rename = "context-types", with = "serde_context_mask")] pub value: u64, diff --git a/devices/src/virtio/tpm.rs b/devices/src/virtio/tpm.rs index a47d9ecf49..3af144210c 100644 --- a/devices/src/virtio/tpm.rs +++ b/devices/src/virtio/tpm.rs @@ -256,7 +256,7 @@ impl VirtioDevice for Tpm { impl Suspendable for Tpm {} -#[derive(PartialEq)] +#[derive(PartialEq, Eq)] enum NeedsInterrupt { Yes, No, diff --git a/devices/src/virtio/vhost/user/proxy.rs b/devices/src/virtio/vhost/user/proxy.rs index 6b13f91af3..63e6a9dd08 100644 --- a/devices/src/virtio/vhost/user/proxy.rs +++ b/devices/src/virtio/vhost/user/proxy.rs @@ -295,7 +295,7 @@ struct Worker { pending_unmap: Option, } -#[derive(EventToken, Debug, Clone, PartialEq)] +#[derive(EventToken, Debug, Clone, PartialEq, Eq)] enum Token { // Data is available on the Vhost-user sibling socket. SiblingSocket, diff --git a/devices/src/virtio/vsock/vsock.rs b/devices/src/virtio/vsock/vsock.rs index 9eefa33a90..7b158cb546 100644 --- a/devices/src/virtio/vsock/vsock.rs +++ b/devices/src/virtio/vsock/vsock.rs @@ -649,7 +649,7 @@ impl Worker { // by allocating the buffer and overlapped struct // on the heap. unsafe { - match pipe_connection.read_overlapped(&mut buffer[..], &mut *overlapped_wrapper) + match pipe_connection.read_overlapped(&mut buffer[..], &mut overlapped_wrapper) { Ok(()) => {} Err(e) => { diff --git a/e2e_tests/tests/fixture/sys/windows.rs b/e2e_tests/tests/fixture/sys/windows.rs index 016e07afd5..d6919937a8 100644 --- a/e2e_tests/tests/fixture/sys/windows.rs +++ b/e2e_tests/tests/fixture/sys/windows.rs @@ -151,14 +151,14 @@ impl TestVmSys { let earlycon_path = Path::new(logs_dir).join(GUEST_EARLYCON); let earlycon_str = earlycon_path.to_str().unwrap(); - command.args(&[ + command.args([ r"--serial", &format!("hardware=serial,num=1,type=file,path={earlycon_str},earlycon=true"), ]); let console_path = Path::new(logs_dir).join(GUEST_CONSOLE); let console_str = console_path.to_str().unwrap(); - command.args(&[ + command.args([ r"--serial", &format!("hardware=virtio-console,num=1,type=file,path={console_str},console=true"), ]); @@ -168,14 +168,14 @@ impl TestVmSys { "hardware=serial,type=namedpipe,path={},num=2", from_guest_pipe.display(), ); - command.args(&["--serial", &serial_params]); + command.args(["--serial", &serial_params]); } /// Configures the VM rootfs to load from the guest_under_test assets. fn configure_rootfs(command: &mut Command, _o_direct: bool) { let rootfs_and_option = format!("{},ro,root,sparse=false", rootfs_path().to_str().unwrap(),); - command.args(&["--root", &rootfs_and_option]).args(&[ + command.args(["--root", &rootfs_and_option]).args([ "--params", "init=/bin/delegate noxsaves noxsave nopat nopti tsc=reliable", ]); @@ -194,7 +194,7 @@ impl TestVmSys { let from_guest_pipe = Path::new(&from_guest_path); let mut command = Command::new(find_crosvm_binary()); - command.args(&["--log-level", "INFO", "run-mp"]); + command.args(["--log-level", "INFO", "run-mp"]); f( &mut command, @@ -207,7 +207,7 @@ impl TestVmSys { let hypervisor_log_path = Path::new(logs_dir).join(HYPERVISOR_LOG); let hypervisor_log_str = hypervisor_log_path.to_str().unwrap(); - command.args(&[ + command.args([ "--logs-directory", logs_dir, "--kernel-log-file", diff --git a/gpu_display/src/gpu_display_win/window.rs b/gpu_display/src/gpu_display_win/window.rs index 9af6aec483..8a02bd7b2b 100644 --- a/gpu_display/src/gpu_display_win/window.rs +++ b/gpu_display/src/gpu_display_win/window.rs @@ -117,7 +117,7 @@ impl From for MessagePacket { /// (2) NotInLoop -> WillResizeOrMove -> IsMoving -> NotInLoop. This is for moving modal loops. /// (3) NotInLoop -> WillResizeOrMove -> NotInLoop. This may occur if the user long presses the /// window title bar, window borders or corners, but doesn't actually resize or move the window. -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Eq)] enum SizeMoveLoopState { /// The window is not in the moving or sizing modal loop. NotInLoop, diff --git a/hypervisor/src/haxm/vcpu.rs b/hypervisor/src/haxm/vcpu.rs index b22ef3c254..75b516918a 100644 --- a/hypervisor/src/haxm/vcpu.rs +++ b/hypervisor/src/haxm/vcpu.rs @@ -381,7 +381,7 @@ impl VcpuX86_64 for HaxmVcpu { // Safe because we know we mapped enough memory to hold the hax_tunnel struct because the // kernel told us how large it was. unsafe { - (*self.tunnel).request_interrupt_window = if requested { 1 } else { 0 }; + (*self.tunnel).request_interrupt_window = i32::from(requested); } } diff --git a/media/cros-codecs/src/decoders/vp9/decoder.rs b/media/cros-codecs/src/decoders/vp9/decoder.rs index dcbc59bb27..6a782e259a 100644 --- a/media/cros-codecs/src/decoders/vp9/decoder.rs +++ b/media/cros-codecs/src/decoders/vp9/decoder.rs @@ -82,7 +82,7 @@ impl Default for NegotiationStatus { } } -#[derive(Clone, Debug, Default, PartialEq)] +#[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct Segmentation { /// Loop filter level pub lvl_lookup: [[u8; MAX_MODE_LF_DELTAS]; MAX_REF_FRAMES], diff --git a/net_util/src/slirp.rs b/net_util/src/slirp.rs index 2141808235..3a89e8346e 100644 --- a/net_util/src/slirp.rs +++ b/net_util/src/slirp.rs @@ -47,7 +47,7 @@ pub enum SlirpError { #[cfg(windows)] impl SlirpError { pub fn sys_error(&self) -> SysError { - match &*self { + match self { SlirpError::BrokenPipe(e) => SysError::new(e.raw_os_error().unwrap_or_default()), SlirpError::CloneFailed(e) => SysError::new(e.raw_os_error().unwrap_or_default()), SlirpError::OverlappedError(e) => SysError::new(e.raw_os_error().unwrap_or_default()), diff --git a/rust-toolchain b/rust-toolchain index e6dedaa1a1..e44d5bfee3 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "1.62.1" +channel = "1.65.0" components = [ "rustfmt", "clippy" ] diff --git a/rutabaga_gfx/src/generated/generate.py b/rutabaga_gfx/src/generated/generate.py index 5ea2164843..457f11ce36 100755 --- a/rutabaga_gfx/src/generated/generate.py +++ b/rutabaga_gfx/src/generated/generate.py @@ -85,7 +85,6 @@ def download_virgl(src, dst, branch): if subprocess.Popen(args).wait() == 0: return True else: - return False diff --git a/src/crosvm/sys/windows/broker.rs b/src/crosvm/sys/windows/broker.rs index 54618139a5..6cb78eebca 100644 --- a/src/crosvm/sys/windows/broker.rs +++ b/src/crosvm/sys/windows/broker.rs @@ -515,7 +515,7 @@ fn run_internal(mut cfg: Config) -> Result<()> { let mut metric_tubes = Vec::new(); let metrics_controller = spawn_child( current_exe().unwrap().to_str().unwrap(), - &["run-metrics"], + ["run-metrics"], get_log_path(&cfg, "metrics_stdout.log"), get_log_path(&cfg, "metrics_stderr.log"), ProcessType::Metrics, @@ -536,7 +536,7 @@ fn run_internal(mut cfg: Config) -> Result<()> { let mut main_child = spawn_child( current_exe().unwrap().to_str().unwrap(), - &["run-main"], + ["run-main"], get_log_path(&cfg, "main_stdout.log"), get_log_path(&cfg, "main_stderr.log"), ProcessType::Main, @@ -1095,7 +1095,7 @@ fn spawn_block_backend( vhost_user_device_tube.set_target_pid(main_child.alias_pid); let block_child = spawn_child( current_exe().unwrap().to_str().unwrap(), - &["device", "block"], + ["device", "block"], get_log_path(cfg, &format!("disk_{}_stdout.log", log_index)), get_log_path(cfg, &format!("disk_{}_stderr.log", log_index)), ProcessType::Block, @@ -1347,7 +1347,7 @@ fn spawn_slirp( ) -> Result { let slirp_child = spawn_child( current_exe().unwrap().to_str().unwrap(), - &["run-slirp"], + ["run-slirp"], get_log_path(cfg, "slirp_stdout.log"), get_log_path(cfg, "slirp_stderr.log"), ProcessType::Slirp, @@ -1382,7 +1382,7 @@ fn spawn_net_backend( let net_child = spawn_child( current_exe().unwrap().to_str().unwrap(), - &["device", "net"], + ["device", "net"], get_log_path(cfg, "net_stdout.log"), get_log_path(cfg, "net_stderr.log"), ProcessType::Net, @@ -1498,7 +1498,7 @@ fn start_up_gpu( let gpu_child = spawn_child( current_exe().unwrap().to_str().unwrap(), - &["device", "gpu"], + ["device", "gpu"], get_log_path(cfg, "gpu_stdout.log"), get_log_path(cfg, "gpu_stderr.log"), ProcessType::Gpu, @@ -1728,7 +1728,7 @@ mod tests { let exit_events = vec![Event::new().unwrap()]; let _child_main = spawn_child( "ping", - &["127.0.0.1", "-n", "2"], + ["127.0.0.1", "-n", "2"], None, None, ProcessType::Main, @@ -1756,7 +1756,7 @@ mod tests { let exit_events = vec![Event::new().unwrap()]; let _child_main = spawn_child( "ping", - &["127.0.0.1", "-n", "4"], + ["127.0.0.1", "-n", "4"], None, None, ProcessType::Main, @@ -1769,7 +1769,7 @@ mod tests { ); let _child_device = spawn_child( "ping", - &["127.0.0.1", "-n", "2"], + ["127.0.0.1", "-n", "2"], None, None, ProcessType::Block, @@ -1796,7 +1796,7 @@ mod tests { let exit_events = vec![Event::new().unwrap()]; let _child_main = spawn_child( "ping", - &["127.0.0.1", "-n", "2"], + ["127.0.0.1", "-n", "2"], None, None, ProcessType::Main, @@ -1809,7 +1809,7 @@ mod tests { ); let _child_device = spawn_child( "ping", - &["127.0.0.1", "-n", "11"], + ["127.0.0.1", "-n", "11"], None, None, ProcessType::Block, @@ -1841,7 +1841,7 @@ mod tests { let exit_events = vec![Event::new().unwrap()]; let _child_main = spawn_child( "ping", - &["127.0.0.1", "-n", "11"], + ["127.0.0.1", "-n", "11"], None, None, ProcessType::Main, @@ -1854,7 +1854,7 @@ mod tests { ); let _child_device = spawn_child( "ping", - &["127.0.0.1", "-n", "2"], + ["127.0.0.1", "-n", "2"], None, None, ProcessType::Block, @@ -1886,7 +1886,7 @@ mod tests { let exit_events = vec![Event::new().unwrap()]; let _child_main = spawn_child( "ping", - &["127.0.0.1", "-n", "2"], + ["127.0.0.1", "-n", "2"], None, None, ProcessType::Main, @@ -1899,7 +1899,7 @@ mod tests { ); let _child_device = spawn_child( "cmd", - &["/c", "exit -1"], + ["/c", "exit -1"], None, None, ProcessType::Block, @@ -1934,7 +1934,7 @@ mod tests { let mut children: HashMap = HashMap::new(); let _child_main = spawn_child( "ping", - &["127.0.0.1", "-n", "3"], + ["127.0.0.1", "-n", "3"], None, None, ProcessType::Main, diff --git a/src/crosvm/sys/windows/config.rs b/src/crosvm/sys/windows/config.rs index df7a1761cb..a100da1ad7 100644 --- a/src/crosvm/sys/windows/config.rs +++ b/src/crosvm/sys/windows/config.rs @@ -43,7 +43,7 @@ pub fn validate_config(_cfg: &mut Config) -> std::result::Result<(), String> { Ok(()) } -#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] pub enum IrqChipKind { /// All interrupt controllers are emulated in the kernel. Kernel, @@ -67,7 +67,7 @@ impl FromStr for IrqChipKind { } /// Hypervisor backend. -#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize, Eq)] pub enum HypervisorKind { #[cfg(feature = "gvm")] Gvm, diff --git a/src/main.rs b/src/main.rs index acb14998d9..10dcab2163 100644 --- a/src/main.rs +++ b/src/main.rs @@ -85,7 +85,7 @@ use crate::sys::init_log; static ALLOCATOR: scudo::GlobalScudoAllocator = scudo::GlobalScudoAllocator; #[repr(i32)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] /// Exit code from crosvm, enum CommandStatus { /// Exit with success. Also used to mean VM stopped successfully. diff --git a/tools/audio_streams_conformance_test/src/performance_data.rs b/tools/audio_streams_conformance_test/src/performance_data.rs index 479670e333..ff8196da3c 100644 --- a/tools/audio_streams_conformance_test/src/performance_data.rs +++ b/tools/audio_streams_conformance_test/src/performance_data.rs @@ -73,7 +73,7 @@ impl BufferConsumptionRecord { } } -#[derive(Debug, Serialize, PartialEq)] +#[derive(Debug, Serialize, PartialEq, Eq)] pub struct EstimatedRate { /// linear coefficients of LINEST(frames,timestamps). rate: f64, diff --git a/tools/audio_streams_conformance_test/src/sys/windows.rs b/tools/audio_streams_conformance_test/src/sys/windows.rs index 9d799df666..78238f266f 100644 --- a/tools/audio_streams_conformance_test/src/sys/windows.rs +++ b/tools/audio_streams_conformance_test/src/sys/windows.rs @@ -7,7 +7,7 @@ use audio_streams::StreamSourceGenerator; use crate::args::*; use crate::error::Error; -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum StreamSource {} #[derive(Copy, Clone, Debug, FromArgs, Serialize)] diff --git a/tools/contrib/cargo_refactor.py b/tools/contrib/cargo_refactor.py index a800cee696..f1571b433c 100644 --- a/tools/contrib/cargo_refactor.py +++ b/tools/contrib/cargo_refactor.py @@ -41,7 +41,7 @@ def replace_in_file(file_path: Path, search: SearchPattern, replace: Replacement def replace_in_files(glob: str, replacements: List[Tuple[SearchPattern, Replacement]]): for file in Path().glob(glob): - for (search, replace) in replacements: + for search, replace in replacements: replace_in_file(file, search, replace) diff --git a/tools/impl/dev_container/Dockerfile b/tools/impl/dev_container/Dockerfile index 5655d1a499..19c8eaa8c8 100644 --- a/tools/impl/dev_container/Dockerfile +++ b/tools/impl/dev_container/Dockerfile @@ -9,6 +9,13 @@ # # Note, if you are using docker, you will probably be using "Dockerfile.user". +# Build catapult dashboard upload tool in a builder container +FROM docker.io/golang:bullseye AS gobuilder +WORKDIR /root/ +RUN git clone https://fuchsia.googlesource.com/infra/infra +WORKDIR /root/infra/cmd/catapult +RUN go build + FROM docker.io/debian:testing-slim ENV RUSTUP_HOME=/usr/local/rustup \ @@ -65,6 +72,9 @@ RUN /tools/setup-wine64 # Install global config.toml for cross-compilation COPY --chmod=555 .cargo/config.debian.toml /.cargo/config.toml +# Install catapult dashboard upload tool +COPY --from=gobuilder /root/infra/cmd/catapult/catapult /tools/ + # Prebuild aarch64 VM image for faster startup. COPY tools/aarch64vm /tools/ COPY /tools/impl/testvm.py /tools/impl/ diff --git a/tools/impl/dev_container/version b/tools/impl/dev_container/version index ba80cc04d6..1bef80c2c3 100644 --- a/tools/impl/dev_container/version +++ b/tools/impl/dev_container/version @@ -1 +1 @@ -r0033 +r0034 diff --git a/tools/install-deps b/tools/install-deps index 0ccead5714..fa47a355cb 100755 --- a/tools/install-deps +++ b/tools/install-deps @@ -81,7 +81,7 @@ rustup target add x86_64-pc-windows-gnu curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v0.19.3/cargo-binstall-x86_64-unknown-linux-gnu.tgz | tar -xzvvf - -C ${CARGO_HOME:-~/.cargo}/bin # The bindgen tool is required to build a crosvm dependency. -cargo binstall --no-confirm bindgen --version "0.60.1" +cargo install bindgen-cli --version "0.64.0" # binutils are wrappers to call the rustup bundled versions of llvm tools. cargo binstall --no-confirm cargo-binutils diff --git a/tube_transporter/src/lib.rs b/tube_transporter/src/lib.rs index 2cb9438d2b..ecff257b18 100644 --- a/tube_transporter/src/lib.rs +++ b/tube_transporter/src/lib.rs @@ -51,7 +51,7 @@ pub enum TubeTransportError { } /// The target child process will use this decide what a Tube's purpose is. -#[derive(Serialize, Deserialize, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] pub enum TubeToken { Bootstrap, Control, diff --git a/win_util/src/lib.rs b/win_util/src/lib.rs index 531f0e4cc0..4da70a40a0 100644 --- a/win_util/src/lib.rs +++ b/win_util/src/lib.rs @@ -270,7 +270,7 @@ pub unsafe fn create_file_mapping( } } -#[derive(PartialEq)] +#[derive(PartialEq, Eq)] pub enum ThreadState { // The specified thread was not suspended. NotSuspended,