~quf/tocs

1d81df015c8f360ef2879c887a0de8cd34a1a7b9 — Lukas Himbert 5 months ago de8cfd7
cleanup
2 files changed, 4 insertions(+), 1 deletions(-)

M sqlite_conv/src/main.rs
M tocs/src/io/mem_writer.rs
M sqlite_conv/src/main.rs => sqlite_conv/src/main.rs +1 -1
@@ 7,7 7,7 @@ use tocs::tbl::Attribute;

use anyhow::Context as _;

#[allow(non_camel_case_types)]
#[allow(non_camel_case_types, clippy::enum_variant_names)]
#[derive(Debug, Parser)]
enum Args {
    /// Convert a folder of tbl files to a sqlite database

M tocs/src/io/mem_writer.rs => tocs/src/io/mem_writer.rs +3 -0
@@ 5,6 5,7 @@ pub struct MemWriter {
}

impl MemWriter {
    #[allow(dead_code)]
    pub fn new() -> Self {
        Self::with_capacity(0)
    }


@@ 28,6 29,7 @@ impl MemWriter {
macro_rules! write_primitive {
    ($f:ident, $t:ty) => {
        #[inline(always)]
        #[allow(dead_code)]
        pub fn $f(&mut self, x: $t) {
            self.inner.extend_from_slice(&x.to_le_bytes());
        }


@@ 53,6 55,7 @@ impl MemWriter {
        self.inner.resize(self.inner.len() + n, 0u8);
    }

    #[allow(dead_code)]
    pub fn write_padded_byte_str<const PADDING: usize>(&mut self, s: PaddedByteStr<'_, PADDING>) {
        s.write_to(&mut self.inner).unwrap(); // writing to vec should not fail
    }