Skip to content

Commit

Permalink
remove binrw private references
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlettman committed Aug 16, 2024
1 parent a949347 commit 9b6be2e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/types/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::types::{
util::primitive::{read_u8_bits, write_u8_bits},
DataBits, Logf, ProfileGrid, Zero,
};
use binrw::__private::Required;
use binrw::meta::{EndianKind, ReadEndian, WriteEndian};
use binrw::{BinRead, BinResult, BinWrite, Endian};
use std::io::{Read, Seek, Write};
Expand Down Expand Up @@ -45,7 +44,6 @@ impl BinRead for Config {
fn read<R: Read + Seek>(reader: &mut R) -> BinResult<Self>
where
Self: ReadEndian,
for<'a> Self::Args<'a>: Required,
{
let raw = u8::read(reader)?;
let pos = reader.stream_position()?;
Expand Down Expand Up @@ -80,7 +78,6 @@ impl BinWrite for Config {
fn write<W: Write + Seek>(&self, writer: &mut W) -> BinResult<()>
where
Self: WriteEndian,
for<'a> Self::Args<'a>: Required,
{
let mut raw: u8 = 0;
let pos = writer.stream_position()?;
Expand Down
3 changes: 0 additions & 3 deletions src/types/motion_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::types::{
util::primitive::{read_u8_bits, write_u8_bits},
Direction, Mode, StepSize, Transducer,
};
use binrw::__private::Required;
use binrw::meta::{EndianKind, ReadEndian, WriteEndian};
use binrw::{BinRead, BinResult, BinWrite, Endian};
use std::io::{Read, Seek, Write};
Expand Down Expand Up @@ -45,7 +44,6 @@ impl BinRead for MotionConfig {
fn read<R: Read + Seek>(reader: &mut R) -> BinResult<Self>
where
Self: ReadEndian,
for<'a> Self::Args<'a>: Required,
{
let raw = u8::read(reader)?;
let pos = reader.stream_position()?;
Expand Down Expand Up @@ -76,7 +74,6 @@ impl BinWrite for MotionConfig {
fn write<W: Write + Seek>(&self, writer: &mut W) -> BinResult<()>
where
Self: WriteEndian,
for<'a> Self::Args<'a>: Required,
{
let mut raw: u8 = 0;
let pos = writer.stream_position()?;
Expand Down
3 changes: 0 additions & 3 deletions src/types/sensor_information.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use binrw::__private::Required;
use binrw::meta::{EndianKind, ReadEndian, WriteEndian};
use binrw::{BinRead, BinResult, BinWrite, Endian};
use std::fmt::{Display, Formatter};
Expand Down Expand Up @@ -58,7 +57,6 @@ impl BinRead for SensorInformation {
fn read<R: Read + Seek>(reader: &mut R) -> BinResult<Self>
where
Self: ReadEndian,
for<'a> Self::Args<'a>: Required,
{
let raw = u8::read(reader)?;
Ok(Self {
Expand All @@ -83,7 +81,6 @@ impl BinWrite for SensorInformation {
fn write<W: Write + Seek>(&self, writer: &mut W) -> BinResult<()>
where
Self: WriteEndian,
for<'a> Self::Args<'a>: Required,
{
let mut raw: u8 = 0;

Expand Down
3 changes: 0 additions & 3 deletions src/types/sonar_return_magic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use binrw::__private::Required;
use binrw::meta::{EndianKind, ReadEndian, WriteEndian};
use binrw::{BinRead, BinResult, BinWrite, Endian, Error};
use std::io::{Error as IOError, ErrorKind::InvalidData, Read, Seek, Write};
Expand Down Expand Up @@ -38,7 +37,6 @@ impl BinRead for SonarReturnMagic {
fn read<R: Read + Seek>(reader: &mut R) -> BinResult<Self>
where
Self: ReadEndian,
for<'a> Self::Args<'a>: Required,
{
let mut raw = [0u8; 3];
let pos = reader.stream_position()?;
Expand Down Expand Up @@ -70,7 +68,6 @@ impl BinWrite for SonarReturnMagic {
fn write<W: Write + Seek>(&self, writer: &mut W) -> BinResult<()>
where
Self: WriteEndian,
for<'a> Self::Args<'a>: Required,
{
let raw = match *self {
Self::IMX => b"IMX",
Expand Down
3 changes: 0 additions & 3 deletions src/types/sonar_return_status.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use binrw::__private::Required;
use binrw::meta::{EndianKind, ReadEndian, WriteEndian};
use binrw::{BinRead, BinResult, BinWrite, Endian};
use std::io::{Read, Seek, Write};
Expand Down Expand Up @@ -53,7 +52,6 @@ impl BinRead for SonarReturnStatus {
fn read<R: Read + Seek>(reader: &mut R) -> BinResult<Self>
where
Self: ReadEndian,
for<'a> Self::Args<'a>: Required,
{
let raw = u8::read(reader)?;

Expand Down Expand Up @@ -87,7 +85,6 @@ impl BinWrite for SonarReturnStatus {
fn write<W: Write + Seek>(&self, writer: &mut W) -> BinResult<()>
where
Self: WriteEndian,
for<'a> Self::Args<'a>: Required,
{
let mut raw: u8 = 0;

Expand Down

0 comments on commit 9b6be2e

Please sign in to comment.