Skip to content

Commit

Permalink
Fix compiling the doc test without the chrono feature enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Apr 5, 2024
1 parent 19a318b commit 8b215fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion diesel/src/expression/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,9 @@ where
/// name: String,
/// #[diesel(select_expression = posts::columns::title)]
/// title: String,
/// # #[cfg(feature = "chrono")]
/// #[diesel(select_expression = diesel::dsl::now)]
/// access_time: chrono::DateTime<chrono::Utc>,
/// access_time: chrono::NaiveDateTime,
/// }
///
/// # fn main() -> QueryResult<()> {
Expand All @@ -606,6 +607,7 @@ where
/// id: 1,
/// name: "Sean".into(),
/// title: "My first post".into(),
/// # #[cfg(feature = "chrono")]
/// access_time: first_user_post.access_time,
/// };
/// assert_eq!(expected_user_post, first_user_post);
Expand Down

0 comments on commit 8b215fd

Please sign in to comment.