Skip to content

Commit 4bb0a3f

Browse files
committed
edition 2024 and update dependencies
1 parent 3bd3259 commit 4bb0a3f

File tree

10 files changed

+20
-18
lines changed

10 files changed

+20
-18
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- "*"
66
jobs:
77
release:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-24.04
99
permissions:
1010
contents: write
1111
packages: write
@@ -16,7 +16,7 @@ jobs:
1616
env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
linux:
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-24.04
2020
permissions:
2121
contents: write
2222
packages: write

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
linux:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/checkout@v4
1414
- uses: actions-rust-lang/setup-rust-toolchain@v1

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
authors = ["Navid <[email protected]>"]
33
categories = ["command-line-utilities"]
44
description = "Batch rename utility for developers"
5-
edition = "2021"
5+
edition = "2024"
66
homepage = "https://github.com/yaa110/nomino"
77
license = "MIT OR Apache-2.0"
88
name = "nomino"
99
readme = "README.md"
1010
repository = "https://github.com/yaa110/nomino"
11-
version = "1.6.0"
11+
version = "1.6.1"
1212

1313
[dependencies]
1414
anyhow = "1.0"

src/input/formatter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{provider::Capture, Provider};
1+
use super::{Provider, provider::Capture};
22
use crate::errors::FormatError;
33

44
#[derive(Debug, PartialEq)]
@@ -115,7 +115,7 @@ impl Formatter {
115115
}
116116
formatted.push_str(var);
117117
}
118-
Segment::String(ref string) => formatted.push_str(string),
118+
Segment::String(string) => formatted.push_str(string),
119119
}
120120
}
121121
formatted

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use anyhow::{ensure, Result};
1+
use anyhow::{Result, ensure};
22
use colored::{self, Colorize};
33
use is_terminal::IsTerminal;
44
use nomino::cli::{Cli, Order};
55
use nomino::errors::SourceError;
66
use nomino::input::{Formatter, InputIterator, Source};
7-
use prettytable::{format, row, Table};
7+
use prettytable::{Table, format, row};
88
use serde_json::map::Map;
99
use serde_json::value::Value;
1010
use std::env::{args, set_current_dir};

tests/default_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use assert_cmd::Command;
22
use nomino::input::MAIN_SEPARATOR;
3+
use std::fs::File;
34
use std::fs::create_dir_all;
45
use std::fs::read_dir;
5-
use std::fs::File;
66

77
#[test]
88
fn test_default() {

tests/map_test.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use assert_cmd::Command;
2-
use std::fs::read_dir;
32
use std::fs::File;
3+
use std::fs::read_dir;
44
use std::io::Write;
55

66
#[test]
@@ -87,10 +87,12 @@ fn test_map() {
8787

8888
assert!(cmd_undo.status.success());
8989
assert_eq!(files_undo.len(), outputs.len());
90-
assert!(outputs_undo
91-
.iter()
92-
.zip(files_undo.iter())
93-
.all(|(a, b)| a == b));
90+
assert!(
91+
outputs_undo
92+
.iter()
93+
.zip(files_undo.iter())
94+
.all(|(a, b)| a == b)
95+
);
9496

9597
dir.close().unwrap();
9698
}

tests/regex_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use assert_cmd::Command;
22
use nomino::input::MAIN_SEPARATOR;
3+
use std::fs::File;
34
use std::fs::create_dir_all;
45
use std::fs::read_dir;
5-
use std::fs::File;
66

77
#[test]
88
fn test_regex() {

tests/sort_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use assert_cmd::Command;
2-
use std::fs::read_dir;
32
use std::fs::File;
3+
use std::fs::read_dir;
44

55
#[test]
66
fn test_sort() {

0 commit comments

Comments
 (0)