mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-05-31 03:31:06 +00:00
feat: Attempt ipinfo.io if ipapi.co returns no results (#204)
* feat: Attempt ipinfo.io if ipapi.co returns no results * fix: Use the GET method * feat: Added tests * chore: DRY
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use num_traits::{Zero, NumOps, Bounded, ops::saturating::Saturating};
|
||||
use num_traits::{Zero, NumOps, Bounded};
|
||||
use std::iter::Sum;
|
||||
use std::convert::TryFrom;
|
||||
|
||||
@@ -10,7 +10,7 @@ pub struct NumStats<T> {
|
||||
sum: T,
|
||||
}
|
||||
|
||||
impl<T: Saturating + NumOps + Zero + Bounded + Copy + Sum + TryFrom<usize>> NumStats<T> {
|
||||
impl<T: NumOps + Zero + Bounded + Copy + Sum + TryFrom<usize>> NumStats<T> {
|
||||
pub fn new(size: usize) -> Self {
|
||||
NumStats {
|
||||
stack: vec![T::zero(); size].into_boxed_slice(),
|
||||
|
||||
Reference in New Issue
Block a user