Silence warnings, run cargo fmt
This commit is contained in:
parent
fe1c1d3655
commit
af1c767f5f
77 changed files with 1904 additions and 903 deletions
|
|
@ -160,7 +160,12 @@ pub fn validate_non_empty(value: &str, field_name: &str) -> Result<(), AppError>
|
|||
/// # Returns
|
||||
/// - `Ok(())` if length is within bounds
|
||||
/// - `Err(AppError::Validation)` if too short or too long
|
||||
pub fn validate_length(value: &str, field_name: &str, min: usize, max: usize) -> Result<(), AppError> {
|
||||
pub fn validate_length(
|
||||
value: &str,
|
||||
field_name: &str,
|
||||
min: usize,
|
||||
max: usize,
|
||||
) -> Result<(), AppError> {
|
||||
let len = value.len();
|
||||
if len < min || len > max {
|
||||
return Err(AppError::Validation(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue