From ee3f9d270bcdbb06ad11daa61667c694196d46f8 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 14 Apr 2019 23:26:03 +0200 Subject: improved_slice_patterns: various tweaks for crates.io --- improved_slice_patterns/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'improved_slice_patterns/src') diff --git a/improved_slice_patterns/src/lib.rs b/improved_slice_patterns/src/lib.rs index 3fdd9c9..3e459bb 100644 --- a/improved_slice_patterns/src/lib.rs +++ b/improved_slice_patterns/src/lib.rs @@ -1,4 +1,5 @@ #![feature(slice_patterns)] +#![doc(html_root_url = "https://docs.rs/improved_slice_patterns/1.0.1")] //! A tiny crate that provides two macros to help matching //! on `Vec`s and iterators using the syntax of @@ -7,10 +8,13 @@ //! [slice_patterns]: https://doc.rust-lang.org/nightly/unstable-book/language-features/slice-patterns.html /// Destructure an iterator using the syntax of slice_patterns. +/// /// Wraps the match body in `Some` if there was a match; returns /// `None` otherwise. +/// /// Contrary to slice_patterns, this allows moving out /// of the iterator. +/// /// A variable length pattern (`x..`) is only allowed as the last /// pattern, unless the iterator is double-ended. /// @@ -122,10 +126,13 @@ macro_rules! destructure_iter { } /// Pattern-match on a vec using the syntax of slice_patterns. +/// /// Wraps the match body in `Some` if there was a match; returns /// `None` otherwise. +/// /// Contrary to slice_patterns, this allows moving out /// of the `Vec`. +/// /// A variable length pattern (`x..`) returns an iterator. /// /// Example: -- cgit v1.2.3