diff --git a/uniplate-derive/src/state.rs b/uniplate-derive/src/state.rs index 2d27701..38d291d 100644 --- a/uniplate-derive/src/state.rs +++ b/uniplate-derive/src/state.rs @@ -62,9 +62,7 @@ impl ParserState { None => None, }; - if self.current_instance.is_none() { - return None; - }; + self.current_instance.as_ref()?; Some(()) } diff --git a/uniplate/src/intro.md b/uniplate/src/intro.md index 5c0acbf..a16ffb2 100644 --- a/uniplate/src/intro.md +++ b/uniplate/src/intro.md @@ -1,7 +1,7 @@ **Uniplate helps you write simple, boilerplate-free operations on tree shaped data types.** - A port of Haskell's [Uniplate](https://hackage.haskell.org/package/uniplate) -library in Rust. + library in Rust. # Getting Started @@ -191,9 +191,9 @@ The techniques implemented in this crate originate from the following: * [The Uniplate Haskell Library](https://hackage.haskell.org/package/uniplate). * Neil Mitchell and Colin Runciman. 2007. Uniform boilerplate and list processing. In -Proceedings of the ACM SIGPLAN workshop on Haskell workshop (Haskell '07). Association for -Computing Machinery, New York, NY, USA, 49–60. -[(free copy)](https://www.cs.york.ac.uk/plasma/publications/pdf/MitchellRuncimanHW07.pdf) + Proceedings of the ACM SIGPLAN workshop on Haskell workshop (Haskell '07). Association for + Computing Machinery, New York, NY, USA, 49–60. + [(free copy)](https://www.cs.york.ac.uk/plasma/publications/pdf/MitchellRuncimanHW07.pdf) * Huet G. The Zipper. Journal of Functional Programming. 1997;7(5):549–54. -[(free copy)](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/0C058890B8A9B588F26E6D68CF0CE204/S0956796897002864a.pdf/zipper.pdf) + [(free copy)](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/0C058890B8A9B588F26E6D68CF0CE204/S0956796897002864a.pdf/zipper.pdf)