Remove some unused attributes

This commit is contained in:
Serial 2022-02-20 09:10:29 -05:00
parent 0092137b2f
commit 03a8ee8e2a
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
3 changed files with 0 additions and 7 deletions

View file

@ -21,7 +21,6 @@ pub enum TextEncoding {
impl TextEncoding {
/// Get a `TextEncoding` from a u8, must be 0-3 inclusive
#[allow(unused)]
pub fn from_u8(byte: u8) -> Option<Self> {
match byte {
0 => Some(Self::Latin1),
@ -145,7 +144,6 @@ pub(crate) fn utf16_decode(reader: &[u8], endianness: fn([u8; 2]) -> u16) -> Res
.map_err(|_| LoftyError::new(ErrorKind::TextDecode("Given an invalid UTF-16 string")))
}
#[allow(unused)]
pub(crate) fn encode_text(text: &str, text_encoding: TextEncoding, terminated: bool) -> Vec<u8> {
match text_encoding {
TextEncoding::Latin1 => {
@ -171,7 +169,6 @@ pub(crate) fn encode_text(text: &str, text_encoding: TextEncoding, terminated: b
}
}
#[allow(unused)]
fn utf16_encode(text: &str, endianness: fn(u16) -> [u8; 2], terminated: bool) -> Vec<u8> {
let mut encoded = Vec::<u8>::new();

View file

@ -6,7 +6,6 @@ use std::io::{Read, Seek, SeekFrom};
use byteorder::{BigEndian, ReadBytesExt};
pub(super) struct Block {
#[allow(unused)]
pub(super) byte: u8,
pub(super) ty: u8,
pub(super) last: bool,

View file

@ -1,16 +1,13 @@
use crate::types::tag::TagType;
#[allow(unused_imports)]
use std::collections::HashMap;
#[allow(unused)]
macro_rules! first_key {
($key:tt $(| $remaining:expr)*) => {
$key
};
}
#[allow(unused)]
pub(crate) use first_key;
// This is used to create the key/ItemKey maps