diff --git a/.rustfmt.toml b/.rustfmt.toml deleted file mode 100644 index f35ebb7..0000000 --- a/.rustfmt.toml +++ /dev/null @@ -1,12 +0,0 @@ -max_width = 100 -# default is false -wrap_comments = true -comment_width = 100 -struct_lit_single_line = true -imports_layout = "Mixed" -# changed from Preserve (merge_imports = false) -imports_granularity="Crate" -#default false -spaces_around_ranges = true -# was 2015 -edition = "2018" diff --git a/composer/src/composer.rs b/composer/src/composer.rs index cae1f78..65c5704 100644 --- a/composer/src/composer.rs +++ b/composer/src/composer.rs @@ -644,7 +644,7 @@ impl Builder { if let Ok(ip) = ip.parse() { tracing::debug!("Reloading existing container: {}", n); self.existing_containers - .insert(n[1 ..].into(), (container.id.unwrap_or_default(), ip)); + .insert(n[1..].into(), (container.id.unwrap_or_default(), ip)); } } } @@ -664,7 +664,7 @@ impl Builder { /// finds the next unused ip pub fn next_ip(&self) -> Result { - for ip in 2 ..= 255u32 { + for ip in 2..=255u32 { if let Some(ip) = self.network.nth(ip) { if self.existing_containers.values().all(|(_, e)| e != &ip) && self.containers.iter().all(|(_, e)| e != &ip) diff --git a/devinfo/src/mountinfo/io_utils.rs b/devinfo/src/mountinfo/io_utils.rs index 7a955f8..cac99bc 100644 --- a/devinfo/src/mountinfo/io_utils.rs +++ b/devinfo/src/mountinfo/io_utils.rs @@ -13,7 +13,7 @@ pub(crate) fn consistent_read>( let mut current_content = read(path.as_ref())?; let retries = retry_count.unwrap_or(DEFAULT_RETRY_COUNT); - for _ in 0 ..= retries { + for _ in 0..=retries { let new_content = read(path.as_ref())?; if new_content.eq(¤t_content) { diff --git a/devinfo/src/mountinfo/mod.rs b/devinfo/src/mountinfo/mod.rs index fa4d760..109922d 100644 --- a/devinfo/src/mountinfo/mod.rs +++ b/devinfo/src/mountinfo/mod.rs @@ -120,7 +120,7 @@ impl MountInfo { match b { b'\\' => { let mut code = 0; - for _i in 0 .. 3 { + for _i in 0..3 { if let Some(b) = bytes.next() { code *= 8; code += u32::from_str_radix(&(b as char).to_string(), 8) diff --git a/nvmeadm/tests/discovery_test.rs b/nvmeadm/tests/discovery_test.rs index 54846b4..e2f049a 100644 --- a/nvmeadm/tests/discovery_test.rs +++ b/nvmeadm/tests/discovery_test.rs @@ -47,7 +47,7 @@ fn wait_for_engine_ready(listening_port: u32) -> Result<(), String> { let dest = format!("127.0.0.1:{listening_port}"); let socket_addr: SocketAddr = dest.parse().expect("Badly formed address"); - for _ in 1 .. 20 { + for _ in 1..20 { let result = TcpStream::connect_timeout(&socket_addr, Duration::from_millis(100)); if result.is_ok() { diff --git a/shell.nix b/shell.nix index 1ed260c..bb1ac49 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ profile ? "nightly", version ? "2024-10-30" }: +{ profile ? "stable", version ? "1.82.0" }: let sources = import ./nix/sources.nix; pkgs = import sources.nixpkgs {