Skip to content

Commit

Permalink
Make Gtfs::from_path to accept non-displayable path
Browse files Browse the repository at this point in the history
  • Loading branch information
loskraes authored and Tristramg committed Mar 5, 2024
1 parent 9a4698f commit 6dfeb11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gtfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Gtfs {
/// Reads the GTFS from a local zip archive or local directory
pub fn from_path<P>(path: P) -> Result<Gtfs, Error>
where
P: AsRef<std::path::Path> + std::fmt::Display,
P: AsRef<std::path::Path>,
{
RawGtfs::from_path(path).and_then(Gtfs::try_from)
}
Expand Down
2 changes: 1 addition & 1 deletion src/gtfs_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl RawGtfsReader {
/// Reads the raw GTFS from a local zip archive or local directory
pub fn read_from_path<P>(&self, path: P) -> Result<RawGtfs, Error>
where
P: AsRef<Path> + std::fmt::Display,
P: AsRef<Path>,
{
let p = path.as_ref();
if p.is_file() {
Expand Down
2 changes: 1 addition & 1 deletion src/raw_gtfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl RawGtfs {
/// Reads the raw GTFS from a local zip archive or local directory
pub fn from_path<P>(path: P) -> Result<Self, Error>
where
P: AsRef<Path> + std::fmt::Display,
P: AsRef<Path>,
{
GtfsReader::default().raw().read_from_path(path)
}
Expand Down

0 comments on commit 6dfeb11

Please sign in to comment.