aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-12 15:36:17 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-08-12 15:37:11 +0200
commit9491e4e16dbcd4d799ec475e461f1008cc319ff1 (patch)
treecd149f40583faf4c8f316975f6ff98fa9c10c07c
parentd772b974feb77e19e0a32069f962dc22e450b352 (diff)
We can terminate with EOF when using -iv1.0.1
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/main.rs9
3 files changed, 2 insertions, 11 deletions
diff --git a/Cargo.lock b/Cargo.lock
index f300522..fd1f7e9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -94,7 +94,7 @@ checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
[[package]]
name = "mmv"
-version = "1.0.0"
+version = "1.0.1"
dependencies = [
"cerm",
"itertools",
diff --git a/Cargo.toml b/Cargo.toml
index 37ecfba..de42a89 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mmv"
-version = "1.0.0"
+version = "1.0.1"
edition = "2021"
license = "0BSD"
description = "Mapped file moves"
diff --git a/src/main.rs b/src/main.rs
index 14ddcb9..def98c2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -263,7 +263,6 @@ fn run_indiv(
src.to_owned()
}
)?;
- ci.write_all(if flags.nul { &[b'\0'] } else { &[b'\n'] })?;
}
let mut co = child.stdout.take().unwrap_or_else(|| {
@@ -271,14 +270,6 @@ fn run_indiv(
});
let mut s = String::with_capacity(src.len());
co.read_to_string(&mut s)?;
- match s.chars().last().unwrap_or_else(|| {
- err!("Filename can’t be the empty string");
- }) {
- '\n' | '\0' => {
- s.pop();
- }
- _ => {}
- };
dsts.push(if flags.encode {
decode_string(s.as_str())
} else {