Skip to content

Commit

Permalink
Make file searching dynamically configurable.
Browse files Browse the repository at this point in the history
This commit extends the previous commit by also making source file
searching dynamically configurable as opposed to forcing the choice when
the data source is created. The `file_exact()` constructor is deprecated
in favor of `file().search(false)`.
  • Loading branch information
SergioBenitez committed Aug 28, 2024
1 parent 01a43d9 commit 3f9f333
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 117 deletions.
7 changes: 0 additions & 7 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use std::fmt::{self, Display};
use std::borrow::Cow;
use std::path::PathBuf;

use serde::{ser, de};

Expand Down Expand Up @@ -129,9 +128,6 @@ pub enum Kind {
/// [`serde::de::Error::duplicate_field()`].
DuplicateField(&'static str),

/// A file marked as required was not present.
MissingFile(PathBuf),

/// The `isize` was not in range of any known sized signed integer.
ISizeOutOfRange(isize),
/// The `usize` was not in range of any known sized unsigned integer.
Expand Down Expand Up @@ -464,9 +460,6 @@ impl Display for Kind {
Kind::DuplicateField(v) => {
write!(f, "duplicate field `{}`", v)
}
Kind::MissingFile(v) => {
write!(f, "missing file `{}`", v.to_string_lossy())
}
Kind::ISizeOutOfRange(v) => {
write!(f, "signed integer `{}` is out of range", v)
}
Expand Down
Loading

0 comments on commit 3f9f333

Please # to comment.