Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
51f39b6793 | |||
c4b68acb54 | |||
931b570aea |
14 changed files with 43 additions and 218 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -4,4 +4,4 @@ version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "estring"
|
name = "estring"
|
||||||
version = "0.3.0"
|
version = "0.2.1"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "estring"
|
name = "estring"
|
||||||
description = "A simple way to parse a string using type annotations"
|
description = "A simple way to parse a string using type annotations"
|
||||||
version = "0.3.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -28,7 +28,7 @@ maintenance = { status = "actively-developed" }
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "calc"
|
name = "calc"
|
||||||
required-features = ["structs", "aggs"]
|
required-features = ["structs"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "dotenv"
|
name = "dotenv"
|
||||||
|
|
38
README.md
38
README.md
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
estring = "0.3"
|
estring = "0.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
A simple way to parse a string using type annotations.
|
A simple way to parse a string using type annotations.
|
||||||
|
@ -24,23 +24,6 @@ For more details, see [examples].
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Basic
|
|
||||||
|
|
||||||
```rust
|
|
||||||
use estring::EString;
|
|
||||||
|
|
||||||
fn main() -> estring::Result<()> {
|
|
||||||
let res: i32 = EString::from("10").parse()?;
|
|
||||||
assert_eq!(res, 10);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can use predefined structs like `SepVec` if you enable the `structs`
|
|
||||||
feature.
|
|
||||||
|
|
||||||
Note: You can use custom types as annotations! Just implement `ParseFragment`!
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use estring::{SepVec, EString};
|
use estring::{SepVec, EString};
|
||||||
|
|
||||||
|
@ -59,23 +42,8 @@ fn main() -> estring::Result<()> {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use predefined aggregators if you enable the `aggs` feature.
|
You can use custom types as annotations! Just implement
|
||||||
|
`estring::ParseFragment`!
|
||||||
```rust
|
|
||||||
use estring::{Aggregate, EString, Product, SepVec, Sum};
|
|
||||||
|
|
||||||
type PlusVec<T> = SepVec<T, '+'>;
|
|
||||||
type MulVec<T> = SepVec<T, '*'>;
|
|
||||||
|
|
||||||
fn main() -> estring::Result<()> {
|
|
||||||
let res = EString::from("10+5*2+3")
|
|
||||||
.parse::<Sum<PlusVec<Product<MulVec<f32>>>>>()?
|
|
||||||
.agg();
|
|
||||||
|
|
||||||
assert_eq!(res, 23.0);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contact Us
|
## Contact Us
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
use estring::{Aggregate, EString, Product, SepVec, Sum};
|
use estring::{EString, SepVec};
|
||||||
|
|
||||||
type PlusVec<T> = SepVec<T, '+'>;
|
type PlusVec<T> = SepVec<T, '+'>;
|
||||||
type MulVec<T> = SepVec<T, '*'>;
|
type MulVec<T> = SepVec<T, '*'>;
|
||||||
|
|
||||||
fn main() -> estring::Result<()> {
|
fn main() -> estring::Result<()> {
|
||||||
let res = EString::from("10+5*2+3")
|
let res = EString::from("10+5*2+3")
|
||||||
.parse::<Sum<PlusVec<Product<MulVec<f32>>>>>()?
|
.parse::<PlusVec<MulVec<f32>>>()?
|
||||||
.agg();
|
.iter()
|
||||||
|
.map(|m| m.iter().product::<f32>())
|
||||||
|
.sum::<f32>();
|
||||||
|
|
||||||
assert_eq!(res, 23.0);
|
assert_eq!(res, 23.0);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
//! This module will contain aggregate functions (Sum, Product, etc)
|
//! This module will contain aggregate functions (Sum, Product, etc)
|
||||||
//!
|
//!
|
||||||
|
|
||||||
mod product;
|
|
||||||
mod sum;
|
mod sum;
|
||||||
|
|
||||||
pub use product::*;
|
|
||||||
pub use sum::*;
|
pub use sum::*;
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
use crate::{Aggregatable, Aggregate, EString, ParseFragment};
|
|
||||||
|
|
||||||
/// Aggregate struct, that can multiply inner aggregatable [items](Aggregatable::items) if
|
|
||||||
/// [``Aggregatable::Item``] implements [``std::iter::Product``](std::iter::Product)
|
|
||||||
///
|
|
||||||
/// # Examples
|
|
||||||
///
|
|
||||||
/// ```rust
|
|
||||||
/// use estring::{Aggregate, EString, SepVec, Product};
|
|
||||||
/// let res = EString::from("1*2*3*4")
|
|
||||||
/// .parse::<Product<SepVec<i32, '*'>>>()
|
|
||||||
/// .unwrap()
|
|
||||||
/// .agg();
|
|
||||||
/// assert_eq!(res, 24);
|
|
||||||
/// ```
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
|
||||||
pub struct Product<T>(pub T);
|
|
||||||
|
|
||||||
impl<T> ParseFragment for Product<T>
|
|
||||||
where
|
|
||||||
T: ParseFragment,
|
|
||||||
{
|
|
||||||
fn parse_frag(es: EString) -> crate::Result<Self> {
|
|
||||||
T::parse_frag(es).map(Self)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<R, T> Aggregate for Product<T>
|
|
||||||
where
|
|
||||||
R: std::iter::Product,
|
|
||||||
T: Aggregatable<Item = R>,
|
|
||||||
{
|
|
||||||
type Target = R;
|
|
||||||
|
|
||||||
fn agg(self) -> Self::Target {
|
|
||||||
self.0.items().into_iter().product()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<R, T> Aggregatable for Product<T>
|
|
||||||
where
|
|
||||||
R: std::iter::Product,
|
|
||||||
T: Aggregatable<Item = R>,
|
|
||||||
{
|
|
||||||
type Item = R;
|
|
||||||
|
|
||||||
fn items(self) -> Vec<Self::Item> {
|
|
||||||
vec![self.agg()]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use crate::SepVec;
|
|
||||||
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
type CommaVec<T> = SepVec<T, ','>;
|
|
||||||
type MulVec<T> = SepVec<T, '*'>;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_parse_vec() {
|
|
||||||
let es = EString::from("1,2,3");
|
|
||||||
match es.parse::<Product<CommaVec<i32>>>() {
|
|
||||||
Ok(res) => assert_eq!(res, Product(CommaVec::from(vec![1, 2, 3]))),
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_aggregate_vector() {
|
|
||||||
let es = EString::from("1,2,3");
|
|
||||||
let expr = es.parse::<Product<CommaVec<i32>>>().unwrap();
|
|
||||||
assert_eq!(expr.agg(), 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_aggregate_vector_with_inner_vector() {
|
|
||||||
let es = EString::from("1*2,2,3");
|
|
||||||
let expr = es.parse::<Product<CommaVec<MulVec<i32>>>>().unwrap();
|
|
||||||
assert_eq!(expr.agg(), 12);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn should_aggregate_vector_with_inner_aggregation() {
|
|
||||||
let es = EString::from("1*2,2,3");
|
|
||||||
let expr = es
|
|
||||||
.parse::<Product<CommaVec<Product<MulVec<i32>>>>>()
|
|
||||||
.unwrap();
|
|
||||||
assert_eq!(expr.agg(), 12);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,31 +1,26 @@
|
||||||
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use crate::{Aggregatable, Aggregate, EString, ParseFragment};
|
use crate::{Aggregatable, Aggregate, EString, ParseFragment};
|
||||||
|
|
||||||
/// Aggregate struct, that can sum inner aggregatable [items](Aggregatable::items) if
|
|
||||||
/// [``Aggregatable::Item``] implements [``std::iter::Sum``](std::iter::Sum)
|
|
||||||
///
|
|
||||||
/// # Examples
|
|
||||||
///
|
|
||||||
/// ```rust
|
|
||||||
/// use estring::{Aggregate, EString, SepVec, Sum};
|
|
||||||
/// let res = EString::from("1+2+3+4")
|
|
||||||
/// .parse::<Sum<SepVec<i32, '+'>>>()
|
|
||||||
/// .unwrap()
|
|
||||||
/// .agg();
|
|
||||||
/// assert_eq!(res, 10);
|
|
||||||
/// ```
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
pub struct Sum<T>(pub T);
|
struct Sum<R, T>(T, PhantomData<R>);
|
||||||
|
|
||||||
impl<T> ParseFragment for Sum<T>
|
impl<R, T> Sum<R, T> {
|
||||||
|
fn new(inner: T) -> Self {
|
||||||
|
Self(inner, PhantomData::default())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<R, T> ParseFragment for Sum<R, T>
|
||||||
where
|
where
|
||||||
T: ParseFragment,
|
T: ParseFragment,
|
||||||
{
|
{
|
||||||
fn parse_frag(es: EString) -> crate::Result<Self> {
|
fn parse_frag(es: EString) -> crate::Result<Self> {
|
||||||
T::parse_frag(es).map(Self)
|
T::parse_frag(es).map(Self::new)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R, T> Aggregate for Sum<T>
|
impl<R, T> Aggregate for Sum<R, T>
|
||||||
where
|
where
|
||||||
R: std::iter::Sum,
|
R: std::iter::Sum,
|
||||||
T: Aggregatable<Item = R>,
|
T: Aggregatable<Item = R>,
|
||||||
|
@ -37,7 +32,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R, T> Aggregatable for Sum<T>
|
impl<R, T> Aggregatable for Sum<R, T>
|
||||||
where
|
where
|
||||||
R: std::iter::Sum,
|
R: std::iter::Sum,
|
||||||
T: Aggregatable<Item = R>,
|
T: Aggregatable<Item = R>,
|
||||||
|
@ -61,8 +56,8 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn should_parse_vec() {
|
fn should_parse_vec() {
|
||||||
let es = EString::from("1,2,3");
|
let es = EString::from("1,2,3");
|
||||||
match es.parse::<Sum<CommaVec<i32>>>() {
|
match es.parse::<Sum<i32, CommaVec<i32>>>() {
|
||||||
Ok(res) => assert_eq!(res, Sum(CommaVec::from(vec![1, 2, 3]))),
|
Ok(res) => assert_eq!(res, Sum::new(CommaVec::from(vec![1, 2, 3]))),
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,21 +65,23 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn should_aggregate_vector() {
|
fn should_aggregate_vector() {
|
||||||
let es = EString::from("1,2,3");
|
let es = EString::from("1,2,3");
|
||||||
let expr = es.parse::<Sum<CommaVec<i32>>>().unwrap();
|
let expr = es.parse::<Sum<i32, CommaVec<i32>>>().unwrap();
|
||||||
assert_eq!(expr.agg(), 6);
|
assert_eq!(expr.agg(), 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn should_aggregate_vector_with_inner_vector() {
|
fn should_aggregate_vector_with_inner_vector() {
|
||||||
let es = EString::from("1+2,2,3");
|
let es = EString::from("1+2,2,3");
|
||||||
let expr = es.parse::<Sum<CommaVec<PlusVec<i32>>>>().unwrap();
|
let expr = es.parse::<Sum<i32, CommaVec<PlusVec<i32>>>>().unwrap();
|
||||||
assert_eq!(expr.agg(), 8);
|
assert_eq!(expr.agg(), 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn should_aggregate_vector_with_inner_aggregation() {
|
fn should_aggregate_vector_with_inner_aggregation() {
|
||||||
let es = EString::from("1+2,2,3");
|
let es = EString::from("1+2,2,3");
|
||||||
let expr = es.parse::<Sum<CommaVec<Sum<PlusVec<i32>>>>>().unwrap();
|
let expr = es
|
||||||
|
.parse::<Sum<_, CommaVec<Sum<_, PlusVec<i32>>>>>()
|
||||||
|
.unwrap();
|
||||||
assert_eq!(expr.agg(), 8);
|
assert_eq!(expr.agg(), 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,7 +240,6 @@ impl ParseFragment for EString {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
|
||||||
impl Aggregatable for EString {
|
impl Aggregatable for EString {
|
||||||
type Item = Self;
|
type Item = Self;
|
||||||
|
|
||||||
|
@ -264,7 +263,6 @@ impl ToEString for String {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
|
||||||
impl Aggregatable for String {
|
impl Aggregatable for String {
|
||||||
type Item = Self;
|
type Item = Self;
|
||||||
|
|
||||||
|
@ -288,7 +286,6 @@ impl<'a> ToEString for &'a str {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
|
||||||
impl<'a> Aggregatable for &'a str {
|
impl<'a> Aggregatable for &'a str {
|
||||||
type Item = Self;
|
type Item = Self;
|
||||||
|
|
||||||
|
|
42
src/lib.rs
42
src/lib.rs
|
@ -7,23 +7,7 @@
|
||||||
//!
|
//!
|
||||||
//! [enve]: https://github.com/pleshevskiy/enve
|
//! [enve]: https://github.com/pleshevskiy/enve
|
||||||
//!
|
//!
|
||||||
//! ## Usage
|
//! ## Getting started
|
||||||
//!
|
|
||||||
//! Basic
|
|
||||||
//!
|
|
||||||
//! ```rust
|
|
||||||
//! use estring::EString;
|
|
||||||
//!
|
|
||||||
//! fn main() -> estring::Result<()> {
|
|
||||||
//! let res: i32 = EString::from("10").parse()?;
|
|
||||||
//! assert_eq!(res, 10);
|
|
||||||
//! Ok(())
|
|
||||||
//! }
|
|
||||||
//! ```
|
|
||||||
//!
|
|
||||||
//! You can use predefined structs like ``SepVec`` if you enable `structs` feature.
|
|
||||||
//!
|
|
||||||
//! Note: You can use custom types as annotations! Just implement ``ParseFragment``!
|
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use estring::{SepVec, EString};
|
//! use estring::{SepVec, EString};
|
||||||
|
@ -43,30 +27,6 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! You can also use predefined aggregators if you enable `aggs` feature.
|
|
||||||
//!
|
|
||||||
//! ```rust
|
|
||||||
//! use estring::{Aggregate, EString, Product, SepVec, Sum};
|
|
||||||
//!
|
|
||||||
//! type PlusVec<T> = SepVec<T, '+'>;
|
|
||||||
//! type MulVec<T> = SepVec<T, '*'>;
|
|
||||||
//!
|
|
||||||
//! fn main() -> estring::Result<()> {
|
|
||||||
//! let res = EString::from("10+5*2+3")
|
|
||||||
//! .parse::<Sum<PlusVec<Product<MulVec<f32>>>>>()?
|
|
||||||
//! .agg();
|
|
||||||
//!
|
|
||||||
//! assert_eq!(res, 23.0);
|
|
||||||
//! Ok(())
|
|
||||||
//! }
|
|
||||||
//! ```
|
|
||||||
//!
|
|
||||||
//! ---
|
|
||||||
//!
|
|
||||||
//! For more details, see [examples].
|
|
||||||
//!
|
|
||||||
//! [examples]: https://github.com/pleshevskiy/estring/tree/main/examples
|
|
||||||
//!
|
|
||||||
#![deny(clippy::pedantic)]
|
#![deny(clippy::pedantic)]
|
||||||
#![allow(clippy::module_name_repetitions)]
|
#![allow(clippy::module_name_repetitions)]
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::core::{EString, ParseFragment, ToEString};
|
use crate::core::{Aggregatable, EString, ParseFragment, ToEString};
|
||||||
use crate::error::{Error, Reason};
|
use crate::error::{Error, Reason};
|
||||||
|
|
||||||
impl ParseFragment for bool {
|
impl ParseFragment for bool {
|
||||||
|
@ -19,8 +19,7 @@ impl ToEString for bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
impl Aggregatable for bool {
|
||||||
impl crate::core::Aggregatable for bool {
|
|
||||||
type Item = Self;
|
type Item = Self;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::core::{EString, ParseFragment, ToEString};
|
use crate::core::{Aggregatable, EString, ParseFragment, ToEString};
|
||||||
use crate::error::{Error, Reason};
|
use crate::error::{Error, Reason};
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -19,8 +19,7 @@ macro_rules! from_env_string_numbers_impl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
impl Aggregatable for $ty {
|
||||||
impl crate::core::Aggregatable for $ty {
|
|
||||||
type Item = Self;
|
type Item = Self;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::core::{EString, ParseFragment, ToEString};
|
use crate::core::{Aggregatable, EString, ParseFragment, ToEString};
|
||||||
|
|
||||||
impl<T> ToEString for Option<T>
|
impl<T> ToEString for Option<T>
|
||||||
where
|
where
|
||||||
|
@ -25,10 +25,9 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
impl<T> Aggregatable for Option<T>
|
||||||
impl<T> crate::core::Aggregatable for Option<T>
|
|
||||||
where
|
where
|
||||||
T: crate::core::Aggregatable,
|
T: Aggregatable,
|
||||||
{
|
{
|
||||||
type Item = T::Item;
|
type Item = T::Item;
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ hello=bar",
|
||||||
#[test]
|
#[test]
|
||||||
fn should_format_pair() {
|
fn should_format_pair() {
|
||||||
let pair = Pair::<_, '+', _>(1, 2);
|
let pair = Pair::<_, '+', _>(1, 2);
|
||||||
assert_eq!(pair.to_estring(), EString(String::from("1+2")));
|
assert_eq!(pair.clone().to_estring(), EString(String::from("1+2")));
|
||||||
let pair_in_pair = Pair::<_, '=', _>(3, pair);
|
let pair_in_pair = Pair::<_, '=', _>(3, pair);
|
||||||
assert_eq!(pair_in_pair.to_estring(), EString(String::from("3=1+2")));
|
assert_eq!(pair_in_pair.to_estring(), EString(String::from("3=1+2")));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//! Contains the implementations to vec type
|
//! Contains the implementations to vec type
|
||||||
//!
|
//!
|
||||||
|
|
||||||
use crate::core::{EString, ParseFragment, ToEString};
|
use crate::core::{Aggregatable, EString, ParseFragment, ToEString};
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
/// Wrapper for ``Vec`` to split string by a separator (`SEP`).
|
/// Wrapper for ``Vec`` to split string by a separator (`SEP`).
|
||||||
|
@ -92,10 +92,9 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "aggs")]
|
impl<T, const SEP: char> Aggregatable for SepVec<T, SEP>
|
||||||
impl<T, const SEP: char> crate::core::Aggregatable for SepVec<T, SEP>
|
|
||||||
where
|
where
|
||||||
T: crate::core::Aggregatable,
|
T: Aggregatable,
|
||||||
{
|
{
|
||||||
type Item = T::Item;
|
type Item = T::Item;
|
||||||
|
|
||||||
|
@ -107,7 +106,6 @@ where
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Aggregatable;
|
|
||||||
use crate::Pair;
|
use crate::Pair;
|
||||||
use crate::{Error, Reason};
|
use crate::{Error, Reason};
|
||||||
|
|
||||||
|
|
Reference in a new issue