mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 19:30:48 +00:00
Use fully-qualified paths for wrap_impl! macro
This commit is contained in:
parent
a68e237c81
commit
aeb9b2af7b
@ -169,25 +169,25 @@ macro_rules! wrap_impl {
|
|||||||
(self.$v:ident: $t:ty) => {
|
(self.$v:ident: $t:ty) => {
|
||||||
type V = $t;
|
type V = $t;
|
||||||
|
|
||||||
fn with_view<F, R>(&self, f: F) -> Option<R>
|
fn with_view<F, R>(&self, f: F) -> std::option::Option<R>
|
||||||
where
|
where
|
||||||
F: FnOnce(&Self::V) -> R,
|
F: std::ops::FnOnce(&Self::V) -> R,
|
||||||
{
|
{
|
||||||
Some(f(&self.$v))
|
std::option::Option::Some(f(&self.$v))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn with_view_mut<F, R>(&mut self, f: F) -> Option<R>
|
fn with_view_mut<F, R>(&mut self, f: F) -> std::option::Option<R>
|
||||||
where
|
where
|
||||||
F: FnOnce(&mut Self::V) -> R,
|
F: std::ops::FnOnce(&mut Self::V) -> R,
|
||||||
{
|
{
|
||||||
Some(f(&mut self.$v))
|
std::option::Option::Some(f(&mut self.$v))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn into_inner(self) -> Result<Self::V, Self>
|
fn into_inner(self) -> std::result::Result<Self::V, Self>
|
||||||
where
|
where
|
||||||
Self::V: Sized,
|
Self::V: Sized,
|
||||||
{
|
{
|
||||||
Ok(self.$v)
|
std::result::Result::Ok(self.$v)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user