diff --git a/crates/pica-toolkit/src/commands/convert/binary.rs b/crates/pica-toolkit/src/commands/convert/binary.rs index c4dc1b1e0..b04d495c6 100644 --- a/crates/pica-toolkit/src/commands/convert/binary.rs +++ b/crates/pica-toolkit/src/commands/convert/binary.rs @@ -33,15 +33,15 @@ impl ByteRecordWrite for BinaryWriter { occurrence.write_to(&mut self.writer)?; } - self.writer.write_all(&[b' '])?; + self.writer.write_all(b" ")?; for subfield in field.subfields() { subfield.write_to(&mut self.writer)?; } - self.writer.write_all(&[b'\x1e'])?; + self.writer.write_all(b"\x1e")?; } - self.writer.write_all(&[b'\x1d'])?; + self.writer.write_all(b"\x1d")?; Ok(()) } diff --git a/crates/pica-toolkit/src/commands/convert/import.rs b/crates/pica-toolkit/src/commands/convert/import.rs index 09fc85a0a..9f86cce22 100644 --- a/crates/pica-toolkit/src/commands/convert/import.rs +++ b/crates/pica-toolkit/src/commands/convert/import.rs @@ -27,22 +27,22 @@ impl ByteRecordWrite for ImportWriter { &mut self, record: &ByteRecord, ) -> std::io::Result<()> { - self.writer.write_all(&[b'\x1d', b'\x0a'])?; + self.writer.write_all(b"'\x1d\x0a")?; for field in record.iter() { - self.writer.write_all(&[b'\x1e'])?; + self.writer.write_all(b"\x1e")?; self.writer.write_all(field.tag())?; if let Some(occurrence) = field.occurrence() { occurrence.write_to(&mut self.writer)?; } - self.writer.write_all(&[b' '])?; + self.writer.write_all(b" ")?; for subfield in field.subfields() { subfield.write_to(&mut self.writer)?; } - self.writer.write_all(&[b'\x0a'])?; + self.writer.write_all(b"\x0a")?; } Ok(()) diff --git a/crates/pica-toolkit/src/commands/convert/json.rs b/crates/pica-toolkit/src/commands/convert/json.rs index 14df5e83e..1e57ffb41 100644 --- a/crates/pica-toolkit/src/commands/convert/json.rs +++ b/crates/pica-toolkit/src/commands/convert/json.rs @@ -20,7 +20,7 @@ impl JsonWriter { BufWriter::new(Box::new(stdout())) }; - writer.write_all(&[b'['])?; + writer.write_all(b"[")?; Ok(Self { writer, count: 0 }) } } @@ -71,7 +71,7 @@ impl ByteRecordWrite for JsonWriter { } fn finish(&mut self) -> io::Result<()> { - self.writer.write_all(&[b']'])?; + self.writer.write_all(b"]")?; self.writer.flush() } } diff --git a/crates/pica-toolkit/src/commands/convert/plain.rs b/crates/pica-toolkit/src/commands/convert/plain.rs index 89165a199..b131f8642 100644 --- a/crates/pica-toolkit/src/commands/convert/plain.rs +++ b/crates/pica-toolkit/src/commands/convert/plain.rs @@ -34,7 +34,7 @@ impl ByteRecordWrite for PlainWriter { occurrence.write_to(&mut self.writer)?; } - self.writer.write_all(&[b' '])?; + self.writer.write_all(b" ")?; for subfield in field.subfields() { self.writer @@ -44,7 +44,7 @@ impl ByteRecordWrite for PlainWriter { )?; } - self.writer.write_all(&[b'\n'])?; + self.writer.write_all(b"\n")?; } Ok(()) diff --git a/crates/pica-toolkit/src/commands/hash.rs b/crates/pica-toolkit/src/commands/hash.rs index 4390e2cbb..a2e4c4a60 100644 --- a/crates/pica-toolkit/src/commands/hash.rs +++ b/crates/pica-toolkit/src/commands/hash.rs @@ -50,12 +50,6 @@ pub(crate) struct Hash { filenames: Vec, } -#[derive(Debug, Deserialize, Serialize)] -struct Row { - idn: Option, - hash: String, -} - impl Hash { pub(crate) fn run(self, config: &Config) -> CliResult<()> { let mut progress = Progress::new(self.progress);