mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 06:51:01 +01:00
Merge branch 'master' into v4.7
This commit is contained in:
commit
d1352f8869
1 changed files with 5 additions and 5 deletions
|
@ -12,14 +12,14 @@ use std::ops::Add;
|
||||||
///
|
///
|
||||||
/// [`Generic`]: https://docs.rs/frunk/latest/frunk/generic/trait.Generic.html
|
/// [`Generic`]: https://docs.rs/frunk/latest/frunk/generic/trait.Generic.html
|
||||||
pub trait UpState: Sized {
|
pub trait UpState: Sized {
|
||||||
fn up<T, F>(src: T, field: F) -> Self
|
fn up<Src, F>(src: Src, field: F) -> Self
|
||||||
where
|
where
|
||||||
T: Generic,
|
Src: Generic,
|
||||||
Self: Generic<Repr = <<T as Generic>::Repr as Add<HCons<F, HNil>>>::Output>,
|
Self: Generic<Repr = <<Src as Generic>::Repr as Add<HCons<F, HNil>>>::Output>,
|
||||||
<T as Generic>::Repr: Add<HCons<F, HNil>>,
|
<Src as Generic>::Repr: Add<HCons<F, HNil>>,
|
||||||
{
|
{
|
||||||
from_generic(into_generic(src) + h_cons(field, HNil))
|
from_generic(into_generic(src) + h_cons(field, HNil))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> UpState for T {}
|
impl<Dst> UpState for Dst {}
|
||||||
|
|
Loading…
Reference in a new issue