]> git.proxmox.com Git - proxmox.git/commitdiff
const_regex: fixup for previous commit
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 23 Nov 2019 09:48:36 +0000 (10:48 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 23 Nov 2019 09:48:36 +0000 (10:48 +0100)
proxmox-api/src/const_regex.rs

index a6e8ec5681f7f991736d3072854f47cab8f9f6d6..50c8697368c2ad0d848b5fc3ebac391bfdbe7fb6 100644 (file)
@@ -22,7 +22,10 @@ impl fmt::Debug for ConstRegexPattern {
 
 /// Macro to generate a ConstRegexPattern
 ///
-/// ```ignore
+/// ```
+/// # #[macro_use]
+/// # use proxmox_api::*;
+/// #
 /// const_regex!{
 ///    FILE_EXTENSION_REGEX = r".*\.([a-zA-Z]+)$";
 ///    pub SHA256_HEX_REGEX = r"^[a-f0-9]{64}$";
@@ -44,8 +47,8 @@ macro_rules! const_regex {
         ($($pub:tt)*) $(#[$attr:meta])* $name:ident = $regex:expr;
         $($rest:tt)*
     ) =>  {
-        $(#[$attr])* $($pub)* const $name: $crate::schema::ConstRegexPattern =
-            $crate::schema::ConstRegexPattern {
+        $(#[$attr])* $($pub)* const $name: $crate::const_regex::ConstRegexPattern =
+            $crate::const_regex::ConstRegexPattern {
                 regex_string: $regex,
                 regex_obj: (|| ->   &'static ::regex::Regex {
                     ::lazy_static::lazy_static! {