Skip to content

Commit

Permalink
remove clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
paulheinr committed Dec 18, 2023
1 parent a25bd75 commit 6d0d9f8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simulation/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ pub fn init_std_out_logging() {

pub fn init_logging(dir: &Path, file_discriminant: &str) -> (WorkerGuard, WorkerGuard) {
let log_file_name = format!("log_process_{file_discriminant}.txt");
let log_file_appender = rolling::never(dir, &log_file_name);
let log_file_appender = rolling::never(dir, log_file_name);
let (log_file, _guard_log) = non_blocking(log_file_appender);

let trace_dir = dir.join("trace");
let trace_file_name = format!("trace_process_{file_discriminant}.txt");
let trace_file_appender = rolling::never(&trace_dir, &trace_file_name);
let trace_file_appender = rolling::never(trace_dir, trace_file_name);
let (trace_file, _guard_performance) = non_blocking(trace_file_appender);

let collector = tracing_subscriber::registry()
Expand Down
1 change: 1 addition & 0 deletions src/simulation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub mod network;
pub mod population;
pub mod profiling;
pub mod replanning;
#[allow(clippy::module_inception)]
pub mod simulation;
pub mod time_queue;
pub mod vehicles;
Expand Down
1 change: 1 addition & 0 deletions src/simulation/population/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod io;
#[allow(clippy::module_inception)]
pub mod population;
pub mod population_data;
6 changes: 6 additions & 0 deletions src/simulation/replanning/routing/travel_time_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ pub struct TravelTimeCollector {
cache_enter_time_by_vehicle: HashMap<u64, u32>,
}

impl Default for TravelTimeCollector {
fn default() -> Self {
Self::new()
}
}

impl TravelTimeCollector {
pub fn new() -> Self {
TravelTimeCollector {
Expand Down
6 changes: 6 additions & 0 deletions src/simulation/replanning/walk_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ pub struct Walk {

pub struct EuclideanWalkFinder {}

impl Default for EuclideanWalkFinder {
fn default() -> Self {
Self::new()
}
}

impl EuclideanWalkFinder {
pub fn new() -> Self {
Self {}
Expand Down

0 comments on commit 6d0d9f8

Please sign in to comment.