Use ConstraintViolationType only if diesel is enabled
This is used by the errors which are only present if diesel support is
enabled, and thus it was causing a compiler warning.
use std::error::Error;
use std::fmt;
+#[cfg(feature = "diesel")]
+use crate::error::ConstraintViolationType;
use crate::error::{
- ConstraintViolationError, ConstraintViolationType, InternalError, InvalidStateError,
- ResourceTemporarilyUnavailableError,
+ ConstraintViolationError, InternalError, InvalidStateError, ResourceTemporarilyUnavailableError,
};
/// Represents AdminServiceStore errors
