Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Fix the problem thanks to [adwhit/diesel-derive-enum/issues/62#issuec…
Browse files Browse the repository at this point in the history
  • Loading branch information
benthillerkus committed Jan 12, 2022
1 parent 429d1df commit f5a8158
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion diesel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

[print_schema]
file = "src/schema.rs"
import_types = ["diesel::sql_types::*", "crate::types::*"]
import_types = ["diesel::sql_types::*", "crate::types::export*"]
2 changes: 1 addition & 1 deletion src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ table! {

logs (id) {
id -> Int4,
severity -> Level,
severity -> LevelMapping,
}
}
6 changes: 6 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ pub enum Level {
Debug,
Trace,
}

pub mod export {
pub use super::*;

pub use LevelMapping as Level;
}

0 comments on commit f5a8158

Please sign in to comment.