Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 15, 2024
1 parent 5fbc34c commit 2f24509
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions crates/fj-core/src/layers/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@ impl Layer<Validation> {
pub fn take_errors(&mut self) -> Result<(), ValidationErrors> {
self.process(TakeErrors, &mut Vec::new())
}

/// Consume the validation layer, returning any validation errors
pub fn into_result(self) -> Result<(), ValidationErrors> {
let errors = self.into_state().into_errors();

if errors.0.is_empty() {
Ok(())
} else {
Err(errors)
}
}
}

impl Command<Validation> for InsertObject {
Expand Down
5 changes: 0 additions & 5 deletions crates/fj-core/src/validate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ impl Validation {
let errors = HashMap::new();
Self { errors, config }
}

/// Drop this instance, returning the errors it contained
pub fn into_errors(mut self) -> ValidationErrors {
ValidationErrors(self.errors.drain().map(|(_, error)| error).collect())
}
}

impl Drop for Validation {
Expand Down

0 comments on commit 2f24509

Please sign in to comment.