Skip to content

Commit 6d035c5

Browse files
committed
chore: Migrate to Edition 2024
1 parent e69e343 commit 6d035c5

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "CLAiR"
33
version = "0.1.0"
44
authors = ["Pascal Hertleif <killercup@gmail.com>"]
5-
edition = "2018"
5+
edition = "2024"
66

77
[[bin]]
88
name = "cli-args-vars"

src/in-depth/machine-communication-stdin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use clap::{CommandFactory, Parser};
22
use std::{
33
fs::File,
4-
io::{stdin, BufRead, BufReader, IsTerminal},
4+
io::{BufRead, BufReader, IsTerminal, stdin},
55
path::PathBuf,
66
};
77

src/in-depth/signals-channels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use std::time::Duration;
2-
use crossbeam_channel::{bounded, tick, Receiver, select};
31
use anyhow::Result;
2+
use crossbeam_channel::{Receiver, bounded, select, tick};
3+
use std::time::Duration;
44

55
fn ctrl_channel() -> Result<Receiver<()>, ctrlc::Error> {
66
let (sender, receiver) = bounded(100);

src/tutorial/errors-exit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use anyhow::{Context, Result};
22

33
fn main() -> Result<()> {
44
let path = "test.txt";
5-
let content = std::fs::read_to_string(path)
6-
.with_context(|| format!("could not read file `{}`", path))?;
5+
let content =
6+
std::fs::read_to_string(path).with_context(|| format!("could not read file `{}`", path))?;
77
println!("file content: {}", content);
88
Ok(())
99
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![allow(unused)]
22

33
fn main() {
4-
5-
let path = "test.txt";
6-
let pattern = "foo";
7-
4+
let path = "test.txt";
5+
let pattern = "foo";
86
}

0 commit comments

Comments
 (0)