diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/chroot/src/command.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/chroot/src/command.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/chroot/src/command.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/chroot/src/command.rs 2020-07-01 20:53:52.000000000 +0000 @@ -125,11 +125,11 @@ Some(status) => return status_as_result(status, &cmd), None => { if let Some(ref mut stdout) = stdout { - non_blocking_line_reading(stdout, &mut stdout_buffer, &info); + non_blocking_line_reading(stdout, &mut stdout_buffer, &info)?; } if let Some(ref mut stderr) = stderr { - non_blocking_line_reading(stderr, &mut stderr_buffer, &error); + non_blocking_line_reading(stderr, &mut stderr_buffer, &error)?; } } } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disk-ops/src/mkpart.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disk-ops/src/mkpart.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disk-ops/src/mkpart.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disk-ops/src/mkpart.rs 2020-07-01 20:53:52.000000000 +0000 @@ -46,7 +46,7 @@ fn get_partition_flags(&self) -> &[PartitionFlag] { &self.flags } - fn get_partition_label(&self) -> Option<&str> { self.label.as_ref().map(|s| s.as_str()) } + fn get_partition_label(&self) -> Option<&str> { self.label.as_deref() } fn get_partition_type(&self) -> PartitionType { self.kind } } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disk-ops/src/resize.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disk-ops/src/resize.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disk-ops/src/resize.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disk-ops/src/resize.rs 2020-07-01 20:53:52.000000000 +0000 @@ -71,7 +71,7 @@ pub fn is_moving(&self) -> bool { self.old.start != self.new.start } - pub fn absolute_sectors(&self) -> u64 { (self.new.end - self.new.start) } + pub fn absolute_sectors(&self) -> u64 { self.new.end - self.new.start } pub fn relative_sectors(&self) -> i64 { // Obtain the differences between the start and end sectors. diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/disk.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/disk.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/disk.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/disk.rs 2020-07-01 20:53:52.000000000 +0000 @@ -118,7 +118,7 @@ impl BlockDeviceExt for Disk { fn get_device_path(&self) -> &Path { &self.device_path } - fn get_mount_point(&self) -> Option<&Path> { self.mount_point.as_ref().map(|x| x.as_path()) } + fn get_mount_point(&self) -> Option<&Path> { self.mount_point.as_deref() } fn is_read_only(&self) -> bool { self.read_only } } @@ -531,7 +531,6 @@ }) .map(|_| { partition.format_with(fs); - () }) }) } @@ -546,7 +545,6 @@ self.get_partition_mut(partition).ok_or(DiskError::PartitionNotFound { partition }).map( |partition| { partition.flags = flags; - () }, ) } @@ -556,7 +554,6 @@ self.get_partition_mut(partition).ok_or(DiskError::PartitionNotFound { partition }).map( |partition| { partition.name = Some(name); - () }, ) } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/disks.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/disks.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/disks.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/disks.rs 2020-07-01 20:53:52.000000000 +0000 @@ -729,7 +729,7 @@ volumes } - #[cfg_attr(rustfmt, rustfmt_skip)] + #[rustfmt::skip] pub fn get_encrypted_partitions(&self) -> Vec<&PartitionInfo> { // Get an iterator on physical partitions self.get_physical_devices().iter().flat_map(|d| d.get_partitions().iter()) @@ -741,7 +741,7 @@ .collect() } - #[cfg_attr(rustfmt, rustfmt_skip)] + #[rustfmt::skip] pub fn get_encrypted_partitions_mut(&mut self) -> Vec<&mut PartitionInfo> { let mut partitions = Vec::new(); @@ -1179,7 +1179,7 @@ let path = path.as_ref(); for mount in MountIter::new()? { let mount = mount?; - if &mount.dest == path { + if mount.dest == path { return Ok(mount.source); } } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/lvm/mod.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/lvm/mod.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/lvm/mod.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/lvm/mod.rs 2020-07-01 20:53:52.000000000 +0000 @@ -54,7 +54,7 @@ impl BlockDeviceExt for LogicalDevice { fn get_device_path(&self) -> &Path { &self.device_path } - fn get_mount_point(&self) -> Option<&Path> { self.mount_point.as_ref().map(|x| x.as_path()) } + fn get_mount_point(&self) -> Option<&Path> { self.mount_point.as_deref() } } impl SectorExt for LogicalDevice { @@ -122,7 +122,7 @@ pub fn add_sectors(&mut self, sectors: u64) { self.sectors += sectors; } - #[cfg_attr(rustfmt, rustfmt_skip)] + #[rustfmt::skip] pub fn validate(&self) -> Result<(), DiskError> { if self.get_partitions().iter().any(|p| p.name.is_none()) { return Err(DiskError::VolumePartitionLacksLabel { diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/partitions/mod.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/partitions/mod.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/config/partitions/mod.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/config/partitions/mod.rs 2020-07-01 20:53:52.000000000 +0000 @@ -88,7 +88,7 @@ impl BlockDeviceExt for PartitionInfo { fn get_device_path(&self) -> &Path { &self.device_path } - fn get_mount_point(&self) -> Option<&Path> { self.mount_point.as_ref().map(|x| x.as_path()) } + fn get_mount_point(&self) -> Option<&Path> { self.mount_point.as_deref() } } impl PartitionExt for PartitionInfo { @@ -96,7 +96,7 @@ fn get_partition_flags(&self) -> &[PartitionFlag] { &self.flags } - fn get_partition_label(&self) -> Option<&str> { self.name.as_ref().map(|s| s.as_str()) } + fn get_partition_label(&self) -> Option<&str> { self.name.as_deref() } fn get_partition_type(&self) -> PartitionType { self.part_type } @@ -191,7 +191,7 @@ pub fn is_encrypted(&self) -> bool { is_encrypted(self.get_device_path()) } pub fn get_current_lvm_volume_group(&self) -> Option<&str> { - self.original_vg.as_ref().map(|x| x.as_str()) + self.original_vg.as_deref() } /// True if the compared partition has differing parameters from the source. @@ -266,7 +266,7 @@ Some(BlockInfo::new( BlockInfo::get_partition_id(&self.device_path, fs)?, fs, - self.target.as_ref().map(|p| p.as_path()), + self.target.as_deref(), get_preferred_options(fs), )) } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/error.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/error.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/disks/src/error.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/disks/src/error.rs 2020-07-01 20:53:52.000000000 +0000 @@ -3,7 +3,7 @@ use std::{io, path::PathBuf}; /// Defines a variety of errors that may arise from configuring and committing changes to disks. -#[cfg_attr(rustfmt, rustfmt_skip)] +#[rustfmt::skip] #[derive(Debug, Fail)] pub enum DiskError { #[fail(display = "decryption error: {}", why)] diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/external/src/lib.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/external/src/lib.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/external/src/lib.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/external/src/lib.rs 2020-07-01 20:53:52.000000000 +0000 @@ -24,7 +24,7 @@ process::{Command, Stdio}, }; -/// A generic function for executing a variety external commands. +/// A generic function for executing a variety of external commands. pub fn exec( cmd: &str, stdin: Option<&[u8]>, diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/hardware/src/switchable_graphics.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/hardware/src/switchable_graphics.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/hardware/src/switchable_graphics.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/hardware/src/switchable_graphics.rs 2020-07-01 20:53:52.000000000 +0000 @@ -1,8 +1,7 @@ -use super::Module; use misc; use std::{ - fs::{self, OpenOptions}, - io::{self, Read, Write}, + fs, + io::{self, Read}, path::Path, }; @@ -41,7 +40,7 @@ if DEFAULT_INTEGRATED.contains(&product_version) { info!("disabling external NVIDIA graphics by default"); - fs::write(mount_dir.join(POWER), MODPROBE_INTEGRATED); + fs::write(mount_dir.join(POWER), MODPROBE_INTEGRATED)?; } else { info!("settings module options for hybrid graphics mode"); fs::write(mount_dir.join(POWER), MODPROBE_HYBRID)?; diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/locales/src/main_countries.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/locales/src/main_countries.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/locales/src/main_countries.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/locales/src/main_countries.rs 2020-07-01 20:53:52.000000000 +0000 @@ -35,7 +35,7 @@ } }; - get_main_countries_iter(BufReader::new(file).lines().flat_map(|x| x)) + get_main_countries_iter(BufReader::new(file).lines().flatten()) } fn get_main_countries_iter>(iter: I) -> BTreeMap { diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/crates/squashfs/src/lib.rs distinst-0.3.2~1593636832~19.10~312f60f/crates/squashfs/src/lib.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/crates/squashfs/src/lib.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/crates/squashfs/src/lib.rs 2020-07-01 20:53:52.000000000 +0000 @@ -169,15 +169,17 @@ let mut child = { let (slave_stdin, slave_stdout, slave_stderr) = slave_stdio(&tty_path)?; - command - .stdin(unsafe { Stdio::from_raw_fd(slave_stdin.as_raw_fd()) }) - .stdout(unsafe { Stdio::from_raw_fd(slave_stdout.as_raw_fd()) }) - .stderr(unsafe { Stdio::from_raw_fd(slave_stderr.as_raw_fd()) }) - .env("COLUMNS", "") - .env("LINES", "") - .env("TERM", "xterm-256color") - .before_exec(before_exec) - .spawn()? + unsafe { + command + .stdin(Stdio::from_raw_fd(slave_stdin.as_raw_fd())) + .stdout(Stdio::from_raw_fd(slave_stdout.as_raw_fd())) + .stderr(Stdio::from_raw_fd(slave_stderr.as_raw_fd())) + .env("COLUMNS", "") + .env("LINES", "") + .env("TERM", "xterm-256color") + .pre_exec(before_exec) + .spawn()? + } }; let master = unsafe { File::from_raw_fd(master_fd) }; diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/debian/changelog distinst-0.3.2~1593636832~19.10~312f60f/debian/changelog --- distinst-0.3.2~1593555005~19.10~4f5c25d/debian/changelog 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/debian/changelog 2020-07-01 20:53:52.000000000 +0000 @@ -1,6 +1,6 @@ -distinst (0.3.2~1593555005~19.10~4f5c25d) eoan; urgency=medium +distinst (0.3.2~1593636832~19.10~312f60f) eoan; urgency=medium * Auto Build - -- Pop OS (ISO Signing Key) Tue, 30 Jun 2020 16:10:05 -0600 + -- Pop OS (ISO Signing Key) Wed, 1 Jul 2020 13:53:52 -0700 diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/auto.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/auto.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/auto.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/auto.rs 2020-07-01 20:53:52.000000000 +0000 @@ -119,7 +119,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_alongside_option_get_sectors_free( option: *const DistinstAlongsideOption, -) -> libc::uint64_t { +) -> u64 { let option = &*(option as *const AlongsideOption); match option.method { AlongsideMethod::Shrink { sectors_free, .. } => sectors_free, @@ -130,7 +130,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_alongside_option_get_sectors_total( option: *const DistinstAlongsideOption, -) -> libc::uint64_t { +) -> u64 { let option = &*(option as *const AlongsideOption); match option.method { AlongsideMethod::Shrink { sectors_total, .. } => sectors_total, @@ -277,7 +277,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_erase_option_get_sectors( option: *const DistinstEraseOption, -) -> libc::uint64_t { +) -> u64 { if null_check(option).is_err() { return 0; } @@ -524,7 +524,7 @@ tag: DISTINST_INSTALL_OPTION_VARIANT, option: *const libc::c_void, encrypt_pass: *const libc::c_char, - sectors: libc::uint64_t, + sectors: u64, } impl<'a> From<&'a DistinstInstallOption> for InstallOption<'a> { @@ -606,8 +606,8 @@ #[no_mangle] pub unsafe extern "C" fn distinst_install_options_new( disks: *const DistinstDisks, - required: libc::uint64_t, - shrink_overhead: libc::uint64_t, + required: u64, + shrink_overhead: u64, ) -> *mut DistinstInstallOptions { if null_check(disks).is_err() { return ptr::null_mut(); diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/disk.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/disk.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/disk.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/disk.rs 2020-07-01 20:53:52.000000000 +0000 @@ -106,7 +106,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_disk_get_partition( disk: *mut DistinstDisk, - partition: libc::int32_t, + partition: i32, ) -> *mut DistinstPartition { if null_check(disk).is_err() { return ptr::null_mut(); @@ -217,7 +217,7 @@ } #[no_mangle] -pub unsafe extern "C" fn distinst_disk_get_sectors(disk: *const DistinstDisk) -> libc::uint64_t { +pub unsafe extern "C" fn distinst_disk_get_sectors(disk: *const DistinstDisk) -> u64 { if null_check(disk).is_err() { return 0; } @@ -229,7 +229,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_disk_get_sector_size( disk: *const DistinstDisk, -) -> libc::uint64_t { +) -> u64 { if null_check(disk).is_err() { return 0; } @@ -242,7 +242,7 @@ pub unsafe extern "C" fn distinst_disk_get_sector( disk: *const DistinstDisk, sector: *const DistinstSector, -) -> libc::uint64_t { +) -> u64 { if null_check(disk).or_else(|_| null_check(sector)).is_err() { return 0; } @@ -330,7 +330,7 @@ pub unsafe extern "C" fn distinst_disk_resize_partition( disk: *mut DistinstDisk, partition: libc::c_int, - end: libc::uint64_t, + end: u64, ) -> libc::c_int { if null_check(disk).is_err() { return 0; @@ -350,7 +350,7 @@ pub unsafe extern "C" fn distinst_disk_move_partition( disk: *mut DistinstDisk, partition: libc::c_int, - start: libc::uint64_t, + start: u64, ) -> libc::c_int { if null_check(disk).is_err() { return -1; diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/lib.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/lib.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/lib.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/lib.rs 2020-07-01 20:53:52.000000000 +0000 @@ -66,7 +66,7 @@ } #[no_mangle] -pub extern "C" fn distinst_device_layout_hash() -> libc::uint64_t { distinst::device_layout_hash() } +pub extern "C" fn distinst_device_layout_hash() -> u64 { distinst::device_layout_hash() } #[no_mangle] pub unsafe extern "C" fn distinst_device_map_exists(name: *const libc::c_char) -> bool { diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/lvm.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/lvm.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/lvm.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/lvm.rs 2020-07-01 20:53:52.000000000 +0000 @@ -135,7 +135,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_lvm_device_last_used_sector( device: *const DistinstLvmDevice, -) -> libc::uint64_t { +) -> u64 { if null_check(device).is_err() { return 0; } @@ -146,7 +146,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_lvm_device_get_sectors( device: *const DistinstLvmDevice, -) -> libc::uint64_t { +) -> u64 { if null_check(device).is_err() { return 0; } @@ -158,7 +158,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_lvm_device_get_sector_size( device: *const DistinstLvmDevice, -) -> libc::uint64_t { +) -> u64 { if null_check(device).is_err() { return 0; } @@ -171,7 +171,7 @@ pub unsafe extern "C" fn distinst_lvm_device_get_sector( device: *const DistinstLvmDevice, sector: *const DistinstSector, -) -> libc::uint64_t { +) -> u64 { if null_check(device).or_else(|_| null_check(sector)).is_err() { return 0; } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/partition.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/partition.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/partition.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/partition.rs 2020-07-01 20:53:52.000000000 +0000 @@ -152,8 +152,8 @@ #[no_mangle] pub unsafe extern "C" fn distinst_partition_builder_new( - start_sector: libc::uint64_t, - end_sector: libc::uint64_t, + start_sector: u64, + end_sector: u64, filesystem: DISTINST_FILE_SYSTEM, ) -> *mut DistinstPartitionBuilder { let filesystem: FileSystem = match filesystem.into() { @@ -314,7 +314,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_partition_get_number( partition: *const DistinstPartition, -) -> libc::int32_t { +) -> i32 { if null_check(partition).is_err() { return -1; } @@ -392,7 +392,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_partition_get_start_sector( partition: *const DistinstPartition, -) -> libc::uint64_t { +) -> u64 { if null_check(partition).is_err() { return 0; } @@ -404,7 +404,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_partition_get_end_sector( partition: *const DistinstPartition, -) -> libc::uint64_t { +) -> u64 { if null_check(partition).is_err() { return 0; } @@ -574,15 +574,15 @@ #[repr(C)] pub struct DistinstPartitionUsage { // 0 = None, 1 = Some(Ok(T)), 2 = Some(Err(T)) - tag: libc::uint8_t, + tag: u8, // Some(Ok(sectors)) | Some(Err(errno)) - value: libc::uint64_t, + value: u64, } #[no_mangle] pub unsafe extern "C" fn distinst_partition_sectors_used( partition: *const DistinstPartition, - _sector_size: libc::uint64_t, + _sector_size: u64, ) -> DistinstPartitionUsage { if null_check(partition).is_err() { return DistinstPartitionUsage { tag: 2, value: 0 }; diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/sector.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/sector.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/sector.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/sector.rs 2020-07-01 20:53:52.000000000 +0000 @@ -8,7 +8,7 @@ #[derive(Copy, Clone)] pub struct DistinstSector { flag: DISTINST_SECTOR_KIND, - value: libc::uint64_t, + value: u64, } #[repr(C)] @@ -54,7 +54,7 @@ #[repr(C)] pub struct DistinstSectorResult { - tag: libc::uint8_t, + tag: u8, error: *mut libc::c_char, sector: DistinstSector, } @@ -101,27 +101,27 @@ } #[no_mangle] -pub extern "C" fn distinst_sector_unit(value: libc::uint64_t) -> DistinstSector { +pub extern "C" fn distinst_sector_unit(value: u64) -> DistinstSector { DistinstSector { flag: DISTINST_SECTOR_KIND::UNIT, value } } #[no_mangle] -pub extern "C" fn distinst_sector_unit_from_end(value: libc::uint64_t) -> DistinstSector { +pub extern "C" fn distinst_sector_unit_from_end(value: u64) -> DistinstSector { DistinstSector { flag: DISTINST_SECTOR_KIND::UNIT_FROM_END, value } } #[no_mangle] -pub extern "C" fn distinst_sector_megabyte(value: libc::uint64_t) -> DistinstSector { +pub extern "C" fn distinst_sector_megabyte(value: u64) -> DistinstSector { DistinstSector { flag: DISTINST_SECTOR_KIND::MEGABYTE, value } } #[no_mangle] -pub extern "C" fn distinst_sector_megabyte_from_end(value: libc::uint64_t) -> DistinstSector { +pub extern "C" fn distinst_sector_megabyte_from_end(value: u64) -> DistinstSector { DistinstSector { flag: DISTINST_SECTOR_KIND::MEGABYTE_FROM_END, value } } #[no_mangle] -pub extern "C" fn distinst_sector_percent(value: libc::uint16_t) -> DistinstSector { +pub extern "C" fn distinst_sector_percent(value: u16) -> DistinstSector { debug_assert!(value <= 100); DistinstSector { flag: DISTINST_SECTOR_KIND::PERCENT, value: u64::from(value) } } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/timezones.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/timezones.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/timezones.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/timezones.rs 2020-07-01 20:53:52.000000000 +0000 @@ -25,7 +25,7 @@ error!("distinst_timezones_zones: tz input was null"); return ptr::null_mut(); } - let boxed: Box> = + let boxed: Box> = Box::new((&*(tz as *const Timezones)).zones().into_iter()); gen_object_ptr(boxed) as *mut DistinstZones } @@ -44,7 +44,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_zones_next(tz: *mut DistinstZones) -> *const DistinstZone { - let zones = &mut *(tz as *mut Box>); + let zones = &mut *(tz as *mut Box>); zones.next().map_or_else(|| ptr::null(), |zone| zone as *const Zone as *const DistinstZone) } @@ -53,7 +53,7 @@ tz: *mut DistinstZones, nth: libc::c_int, ) -> *const DistinstZone { - let zones = &mut *(tz as *mut Box>); + let zones = &mut *(tz as *mut Box>); zones .nth(nth as usize) .map_or_else(|| ptr::null(), |zone| zone as *const Zone as *const DistinstZone) @@ -62,7 +62,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_zones_destroy(tz: *mut DistinstZones) { if !tz.is_null() { - Box::from_raw(tz as *mut Box>); + Box::from_raw(tz as *mut Box>); } else { error!("distinst_zones_destroy: tz input was null"); } @@ -93,7 +93,7 @@ return ptr::null_mut(); } - let boxed: Box> = + let boxed: Box> = Box::new((&*(zone as *const Zone)).regions().into_iter()); gen_object_ptr(boxed) as *mut DistinstRegions } @@ -105,7 +105,7 @@ pub unsafe extern "C" fn distinst_regions_next( regions: *mut DistinstRegions, ) -> *const DistinstRegion { - let regions = &mut *(regions as *mut Box>); + let regions = &mut *(regions as *mut Box>); regions .next() .map_or_else(|| ptr::null(), |region| region as *const Region as *const DistinstRegion) @@ -116,7 +116,7 @@ regions: *mut DistinstRegions, nth: libc::c_int, ) -> *const DistinstRegion { - let regions = &mut *(regions as *mut Box>); + let regions = &mut *(regions as *mut Box>); regions .nth(nth as usize) .map_or_else(|| ptr::null(), |region| region as *const Region as *const DistinstRegion) @@ -125,7 +125,7 @@ #[no_mangle] pub unsafe extern "C" fn distinst_regions_destroy(tz: *mut DistinstRegions) { if !tz.is_null() { - Box::from_raw(tz as *mut Box>); + Box::from_raw(tz as *mut Box>); } else { error!("distinst_regions_destroy: tz input was null"); } diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/upgrade.rs distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/upgrade.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/ffi/src/upgrade.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/ffi/src/upgrade.rs 2020-07-01 20:53:52.000000000 +0000 @@ -1,20 +1,21 @@ use super::{DistinstDisks, DistinstRecoveryOption}; -use distinst::{self, auto::RecoveryOption, Disks, RecoveryEnv, UpgradeError, UpgradeEvent}; +use distinst::{self, auto::RecoveryOption, Disks, RecoveryEnv, UpgradeEvent}; use libc; use std::ptr; #[repr(C)] pub struct DistinstUpgradeEvent { tag: DISTINST_UPGRADE_TAG, - percent: libc::uint8_t, - str1: *const libc::uint8_t, + percent: u8, + str1: *const u8, str1_length1: libc::size_t, - str2: *const libc::uint8_t, + str2: *const u8, str2_length1: libc::size_t, - str3: *const libc::uint8_t, + str3: *const u8, str3_length1: libc::size_t, } +#[allow(non_camel_case_types)] #[repr(C)] pub enum DISTINST_UPGRADE_TAG { ATTEMPTING_REPAIR, @@ -43,7 +44,7 @@ str3_length1: 0, }; - fn set_str(data: &mut *const libc::uint8_t, len: &mut libc::size_t, message: &str) { + fn set_str(data: &mut *const u8, len: &mut libc::size_t, message: &str) { let message = message.as_bytes(); *data = message.as_ptr(); *len = message.len(); @@ -113,7 +114,7 @@ extern "C" fn(event: DistinstUpgradeEvent, user_data: *mut libc::c_void); pub type DistinstUpgradeRepairCallback = - extern "C" fn(user_data: *mut libc::c_void) -> libc::uint8_t; + extern "C" fn(user_data: *mut libc::c_void) -> u8; #[no_mangle] pub unsafe extern "C" fn distinst_upgrade( diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/src/auto/options/apply.rs distinst-0.3.2~1593636832~19.10~312f60f/src/auto/options/apply.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/src/auto/options/apply.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/src/auto/options/apply.rs 2020-07-01 20:53:52.000000000 +0000 @@ -61,7 +61,7 @@ .and_then(|r| generate_unique_id("cryptdata", &[]).map(|e| (r, e))) .map_err(|why| InstallOptionError::GenerateID { why })?; - let root_vg = root.clone(); + let root_vg = root; let enc = LvmEncryption::new(encrypted_vg, Some(pass), None); Some((enc, root_vg)) } @@ -307,7 +307,7 @@ info!("recovery disk found at {:?}", recovery_path); Disk::from_name(&recovery_path) .ok() - .ok_or(InstallOptionError::DeviceNotFound { path: recovery_path.to_path_buf() })? + .ok_or(InstallOptionError::DeviceNotFound { path: recovery_path })? }; { diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/src/installer/steps/configure/chroot_conf.rs distinst-0.3.2~1593636832~19.10~312f60f/src/installer/steps/configure/chroot_conf.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/src/installer/steps/configure/chroot_conf.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/src/installer/steps/configure/chroot_conf.rs 2020-07-01 20:53:52.000000000 +0000 @@ -214,8 +214,8 @@ &[ "set-x11-keymap", &config.keyboard_layout, - config.keyboard_model.as_ref().map(|x| x.as_str()).unwrap_or(""), - config.keyboard_variant.as_ref().map(|x| x.as_str()).unwrap_or(""), + config.keyboard_model.as_deref().unwrap_or(""), + config.keyboard_variant.as_deref().unwrap_or(""), ], ) .run()?; @@ -371,8 +371,8 @@ config.hostname, config.lang, config.keyboard_layout, - config.keyboard_model.as_ref().map(|x| x.as_str()).unwrap_or(""), - config.keyboard_variant.as_ref().map(|x| x.as_str()).unwrap_or(""), + config.keyboard_model.as_deref().unwrap_or(""), + config.keyboard_variant.as_deref().unwrap_or(""), efi_partuuid.id, recovery_partuuid.id, root_uuid, diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/src/installer/steps/configure/mod.rs distinst-0.3.2~1593636832~19.10~312f60f/src/installer/steps/configure/mod.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/src/installer/steps/configure/mod.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/src/installer/steps/configure/mod.rs 2020-07-01 20:53:52.000000000 +0000 @@ -59,7 +59,7 @@ io::ErrorKind::Other, format!("{}: {}", $value, why) ))?; - );+ + )+ } } @@ -260,8 +260,8 @@ let useradd = if let Some(ref user) = user { chroot.create_user( &user.username, - user.password.as_ref().map(|x| x.as_str()), - user.realname.as_ref().map(|x| x.as_str()), + user.password.as_deref(), + user.realname.as_deref(), ) } else { Ok(()) diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/src/lib.rs distinst-0.3.2~1593636832~19.10~312f60f/src/lib.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/src/lib.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/src/lib.rs 2020-07-01 20:53:52.000000000 +0000 @@ -69,7 +69,7 @@ } use std::{ - io::{self, Read}, + io, path::{Path, PathBuf}, sync::atomic::AtomicBool, }; diff -Nru distinst-0.3.2~1593555005~19.10~4f5c25d/src/upgrade.rs distinst-0.3.2~1593636832~19.10~312f60f/src/upgrade.rs --- distinst-0.3.2~1593555005~19.10~4f5c25d/src/upgrade.rs 2020-06-30 22:10:05.000000000 +0000 +++ distinst-0.3.2~1593636832~19.10~312f60f/src/upgrade.rs 2020-07-01 20:53:52.000000000 +0000 @@ -57,7 +57,7 @@ callback: F, attempt_repair: R, ) -> Result<(), UpgradeError> { - if option.mode.as_ref().map(String::as_str) != Some("upgrade") { + if option.mode.as_deref() != Some("upgrade") { return Err(UpgradeError::ModeNotSet); } Binary files /tmp/tmp0VAP6b/EKYRZgXkKV/distinst-0.3.2~1593555005~19.10~4f5c25d/vendor.tar.xz and /tmp/tmp0VAP6b/a5pxYWrhZJ/distinst-0.3.2~1593636832~19.10~312f60f/vendor.tar.xz differ