Skip to content

Commit b96d65c

Browse files
committed
add more comments
1 parent 61502c2 commit b96d65c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ fn validate(str: &str) -> Result<(), Error> {
123123
Ok(())
124124
}
125125

126+
/// TurkishId types are displayed as regular numbers.
126127
impl Display for TurkishId {
127128
fn fmt(&self, f: &mut Formatter) -> Result<(), core::fmt::Error> {
128129
write!(
@@ -133,6 +134,8 @@ impl Display for TurkishId {
133134
}
134135
}
135136

137+
/// TurkishId can only be constructed from a string despite that it's stored
138+
/// as a fixed-length byte array internally.
136139
impl FromStr for TurkishId {
137140
type Err = Error;
138141
fn from_str(s: &str) -> Result<Self, Self::Err> {

0 commit comments

Comments
 (0)