Skip to content

Commit

Permalink
style: switch to rust stable (#106)
Browse files Browse the repository at this point in the history
Switches to rust stable compiler.

Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro authored Nov 27, 2024
1 parent af74cfc commit f160a70
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
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

0 comments on commit f160a70

Please sign in to comment.