File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -587,7 +587,8 @@ impl PasswordHash {
587
587
/// # Examples
588
588
///
589
589
/// ```
590
- /// use cot::auth::{Password, PasswordHash};
590
+ /// use cot::auth::PasswordHash;
591
+ /// use cot::form::types::Password;
591
592
///
592
593
/// let hash = PasswordHash::from_password(&Password::new("password"));
593
594
/// assert!(!hash.as_str().is_empty());
@@ -607,7 +608,8 @@ impl PasswordHash {
607
608
/// # Examples
608
609
///
609
610
/// ```
610
- /// use cot::auth::{Password, PasswordHash};
611
+ /// use cot::auth::PasswordHash;
612
+ /// use cot::form::types::Password;
611
613
///
612
614
/// let hash = PasswordHash::from_password(&Password::new("password"));
613
615
/// assert!(!hash.into_string().is_empty());
Original file line number Diff line number Diff line change 8
8
use std:: fmt:: Debug ;
9
9
use std:: str:: FromStr ;
10
10
11
+ #[ cfg( feature = "db" ) ]
11
12
use cot:: db:: impl_mysql:: MySqlValueRef ;
13
+ #[ cfg( feature = "db" ) ]
12
14
use cot:: db:: impl_postgres:: PostgresValueRef ;
15
+ #[ cfg( feature = "db" ) ]
13
16
use cot:: db:: impl_sqlite:: SqliteValueRef ;
14
17
use email_address:: EmailAddress ;
15
18
@@ -270,6 +273,7 @@ impl TryFrom<String> for Email {
270
273
/// Implements database value conversion for `Email`.
271
274
///
272
275
/// This allows `Email` to be stored in the database as a text value.
276
+ #[ cfg( feature = "db" ) ]
273
277
impl ToDbValue for Email {
274
278
fn to_db_value ( & self ) -> DbValue {
275
279
self . 0 . clone ( ) . to_string ( ) . into ( )
You can’t perform that action at this time.
0 commit comments