Further cleanup

This commit is contained in:
Nadja Reitzenstein 2021-10-20 13:47:44 +02:00
parent eec6c3b60c
commit efe2da87d3
2 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,6 @@ use clap::{App, Arg, crate_version, crate_description, crate_name};
use std::str::FromStr;
use diflouroborane::{config, error::Error};
use std::net::ToSocketAddrs;
use std::error::Error as _;
fn main_res() -> Result<(), Error> {
// Argument parsing

View File

@ -108,10 +108,18 @@ macro_rules! impl_convert_from_to {
}
impl_convert_from_to!(u8, 2, VarU8);
impl_convert_from_to!(u16, 3, VarU16);
impl_convert_from_to!(u32, 5, VarU32);
impl_convert_from_to!(u64, 10, VarU64);
impl_convert_from_to!(u128, 19, VarU128);
#[cfg(target_pointer_width = "64")]
type VarUsize = VarU64;
#[cfg(target_pointer_width = "32")]
type VarUsize = VarU32;
#[cfg(target_pointer_width = "16")]
type VarUsize = VarU16;
impl<T, const N: usize> From<&T> for VarUInt<N>
where T: Copy,
VarUInt<N>: From<T>