Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: switch to rust stable #106

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .rustfmt.toml

This file was deleted.

4 changes: 2 additions & 2 deletions composer/src/composer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand All @@ -664,7 +664,7 @@ impl Builder {

/// finds the next unused ip
pub fn next_ip(&self) -> Result<Ipv4Addr, Error> {
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)
Expand Down
2 changes: 1 addition & 1 deletion devinfo/src/mountinfo/io_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub(crate) fn consistent_read<P: AsRef<Path>>(
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(&current_content) {
Expand Down
2 changes: 1 addition & 1 deletion devinfo/src/mountinfo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion nvmeadm/tests/discovery_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Loading