Skip to content

Commit

Permalink
Fix Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudOggy committed Feb 4, 2025
1 parent bfb1ff2 commit b390545
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/file_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<P: AsRef<Path>> PathFileHandler<P> {
}
}

impl<'a, P: AsRef<Path>> FileHandler for &'a mut PathFileHandler<P> {
impl<P: AsRef<Path>> FileHandler for &mut PathFileHandler<P> {
type Reader = File;
fn get_file_if_exists(self, name: &str) -> Result<(Option<Self::Reader>, PathBuf)> {
let f = self.base_path.as_ref().join(name);
Expand Down
6 changes: 3 additions & 3 deletions src/gtfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct Agency {
ticketing_deep_link_id: Option<String>,
}

impl<'a> From<&'a objects::Network> for Agency {
impl From<&objects::Network> for Agency {
fn from(obj: &objects::Network) -> Agency {
Agency {
id: Some(obj.id.clone()),
Expand Down Expand Up @@ -248,7 +248,7 @@ struct BookingRule {
booking_url: Option<String>,
}

impl<'a> From<&'a objects::BookingRule> for BookingRule {
impl From<&objects::BookingRule> for BookingRule {
fn from(obj: &objects::BookingRule) -> BookingRule {
BookingRule {
id: obj.id.clone(),
Expand Down Expand Up @@ -286,7 +286,7 @@ struct Transfer {
min_transfer_time: Option<u32>,
}

impl<'a> From<&'a objects::Transfer> for Transfer {
impl From<&objects::Transfer> for Transfer {
fn from(obj: &objects::Transfer) -> Transfer {
Transfer {
from_stop_id: obj.from_stop_id.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/gtfs/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ where
.collect()
}

impl<'a> From<&'a objects::PhysicalMode> for RouteType {
impl From<&objects::PhysicalMode> for RouteType {
fn from(obj: &objects::PhysicalMode) -> RouteType {
match obj.id.as_str() {
"RailShuttle" | "Tramway" => RouteType::Tramway,
Expand Down
4 changes: 2 additions & 2 deletions src/model_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ impl AsDateTime for &NaiveDateTime {
}
}

impl<'a> VehicleJourneyBuilder<'a> {
impl VehicleJourneyBuilder<'_> {
fn find_or_create_sp(&mut self, sp: &str) -> Idx<StopPoint> {
self.model
.collections
Expand Down Expand Up @@ -1039,7 +1039,7 @@ impl<'a> VehicleJourneyBuilder<'a> {
}
}

impl<'a> Drop for VehicleJourneyBuilder<'a> {
impl Drop for VehicleJourneyBuilder<'_> {
fn drop(&mut self) {
use std::ops::DerefMut;
let collections = &mut self.model.collections;
Expand Down
2 changes: 1 addition & 1 deletion src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ impl<'de> ::serde::Deserialize<'de> for Time {

// using the visitor pattern to avoid a string allocation
struct TimeVisitor;
impl<'de> Visitor<'de> for TimeVisitor {
impl Visitor<'_> for TimeVisitor {
type Value = Time;
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str("a time in the format HH:MM:SS")
Expand Down

0 comments on commit b390545

Please sign in to comment.