mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-11 01:53:23 +01:00
Further cleanup
This commit is contained in:
parent
eec6c3b60c
commit
efe2da87d3
@ -7,7 +7,6 @@ use clap::{App, Arg, crate_version, crate_description, crate_name};
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use diflouroborane::{config, error::Error};
|
use diflouroborane::{config, error::Error};
|
||||||
use std::net::ToSocketAddrs;
|
use std::net::ToSocketAddrs;
|
||||||
use std::error::Error as _;
|
|
||||||
|
|
||||||
fn main_res() -> Result<(), Error> {
|
fn main_res() -> Result<(), Error> {
|
||||||
// Argument parsing
|
// Argument parsing
|
||||||
|
@ -108,10 +108,18 @@ macro_rules! impl_convert_from_to {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl_convert_from_to!(u8, 2, VarU8);
|
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!(u32, 5, VarU32);
|
||||||
impl_convert_from_to!(u64, 10, VarU64);
|
impl_convert_from_to!(u64, 10, VarU64);
|
||||||
impl_convert_from_to!(u128, 19, VarU128);
|
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>
|
impl<T, const N: usize> From<&T> for VarUInt<N>
|
||||||
where T: Copy,
|
where T: Copy,
|
||||||
VarUInt<N>: From<T>
|
VarUInt<N>: From<T>
|
||||||
|
Loading…
Reference in New Issue
Block a user