fix(warnings): remove unused imports to get rid of warnings
This commit is contained in:
parent
2b9f55e4d2
commit
f74cfd3ff3
21 changed files with 15 additions and 38 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use std::io::{Read, Write};
|
||||
use crate::endianness::{IS_BIG_ENDIAN, ReadExtensions};
|
||||
use crate::rmc::structures::RmcSerialize;
|
||||
|
||||
impl<'a> RmcSerialize for &'a [u8]{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ pub struct ConnectionData<'a>{
|
|||
|
||||
impl<'a> RmcSerialize for ConnectionData<'a>{
|
||||
fn serialize(&self, writer: &mut dyn Write) -> crate::rmc::structures::Result<()> {
|
||||
rmc_struct::write_struct(writer, 1, |mut v|{
|
||||
rmc_struct::write_struct(writer, 1, |v|{
|
||||
self.station_url.serialize(v).expect("unable to write station url");
|
||||
self.special_protocols.serialize(v).expect("unable to write special protocols");
|
||||
self.special_station_url.serialize(v).expect("unable to write special station url");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
use macros::RmcSerialize;
|
||||
use crate::kerberos::KerberosDateTime;
|
||||
use crate::rmc::structures::RmcSerialize;
|
||||
use crate::rmc::structures::variant::Variant;
|
||||
|
||||
// rmc structure
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ impl RmcSerialize for bool{
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn deserialize(mut reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
|
||||
fn deserialize(reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
|
||||
Ok(u8::deserialize(reader)? != 0)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ struct StructureHeader{
|
|||
length: u32
|
||||
}
|
||||
|
||||
pub fn write_struct(mut writer: &mut dyn Write, version: u8, pred: impl FnOnce(&mut Vec<u8>) -> Result<()> ) -> Result<()> {
|
||||
pub fn write_struct(writer: &mut dyn Write, version: u8, pred: impl FnOnce(&mut Vec<u8>) -> Result<()> ) -> Result<()> {
|
||||
writer.write_all(&[version])?;
|
||||
|
||||
let mut scratch_space: Vec<u8> = Vec::new();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ impl RmcSerialize for String{
|
|||
}
|
||||
|
||||
impl RmcSerialize for &str{
|
||||
fn deserialize(mut reader: &mut dyn Read) -> Result<Self> {
|
||||
fn deserialize(reader: &mut dyn Read) -> Result<Self> {
|
||||
panic!("cannot serialize to &str")
|
||||
}
|
||||
fn serialize(&self, writer: &mut dyn Write) -> Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue