Skip to content

Commit e8491dd

Browse files
committed
update description
1 parent c152ff5 commit e8491dd

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

src/rule/empty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use std::iter::Map;
88
use std::marker::PhantomData;
99
use std::ops::Add;
1010

11-
/// Empty is a type that indicates that its subject is empty.
12-
/// The definition of empty is defined by EmptyDefinition.
11+
/// The `Empty` type is a type that indicates that its subject is empty.
12+
/// The definition of empty is defined by `EmptyDefinition`.
1313
///
1414
/// # Example
1515
/// ```rust

src/rule/non_empty.rs

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ pub use non_empty_string::*;
1515
pub use non_empty_vec::*;
1616
pub use non_empty_vec_deque::*;
1717

18+
/// The `NonEmpty` type is a type that negates `Empty` using the `Not` composer.
19+
/// It represents data that does not match the empty definition
1820
pub type NonEmpty<T> = Refined<NonEmptyRule<T>>;
1921

2022
/// Rule where the data is non-empty

src/rule/non_empty/non_empty_map.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::hash::{BuildHasher, Hash, RandomState};
1010
/// ```rust
1111
/// # use std::collections::{HashMap, HashSet};
1212
/// # use refined_type::rule::{NonEmptyHashMap, NonEmptyVec};
13+
///
1314
/// let mut map = HashMap::new();
1415
/// map.insert("1", 1);
1516
/// map.insert("2", 2);

src/rule/non_empty/non_empty_string.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::ops::Add;
55
use std::str::FromStr;
66

77
/// This is a predicate type representing a non-empty string
8+
///
89
/// # Example
910
/// ```rust
1011
/// # use refined_type::rule::NonEmptyString;

src/rule/non_empty/non_empty_vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::Refined;
33

44
use std::ops::Add;
55

6-
/// `NonEmptyHashMap` is a `HashMap` that follows the `NonEmptyRule`
6+
/// `NonEmptyVec` is a `Vec` that follows the `NonEmptyRule`
77
///
88
/// # Example
99
/// ```rust

src/rule/number/odd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
macro_rules! odd_rule {
22
($t: ty) => {
33
paste::item! {
4-
/// `Odd[TYPE]` is a type that represents that the number is odd.
4+
/// `Odd[TYPE]` is a type that represents that the number is odd.
55
pub type [<Odd $t:upper>] = $crate::Refined<[<OddRule $t:upper>]>;
66
pub struct [<OddRule $t:upper>];
77

0 commit comments

Comments
 (0)