From f1ad997a4b1f57453a79473b41349e1d8fa7df84 Mon Sep 17 00:00:00 2001 From: Dennis Date: Wed, 5 Jun 2024 14:59:19 +0200 Subject: [PATCH] Rename struct --- tests/common/dot_writer.rs | 6 +++--- tests/cucumber.rs | 13 +++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/common/dot_writer.rs b/tests/common/dot_writer.rs index 94ca980ea..4a1985d28 100644 --- a/tests/common/dot_writer.rs +++ b/tests/common/dot_writer.rs @@ -1,10 +1,10 @@ use std::io::{self, Write}; use cucumber::{cli, event, parser, Event}; +// TODO: add colors +pub struct DotWriter; -pub struct CustomWriter; - -impl cucumber::Writer for CustomWriter { +impl cucumber::Writer for DotWriter { type Cli = cli::Empty; // we provide no CLI options async fn handle_event(&mut self, ev: parser::Result>>, _: &Self::Cli) { diff --git a/tests/cucumber.rs b/tests/cucumber.rs index 4e673c539..efaa5e476 100644 --- a/tests/cucumber.rs +++ b/tests/cucumber.rs @@ -5,19 +5,16 @@ mod common; use cheap_ruler::CheapRuler; use clap::Parser; use common::{ - cli_arguments::Args, dot_writer::CustomWriter, f64_utils::approx_equal, hash_util::md5_of_osrm_executables, nearest_response::NearestResponse, osm::OSMWay, osrm_world::OSRMWorld, task_starter::TaskStarter + cli_arguments::Args, dot_writer::DotWriter, f64_utils::approx_equal, + hash_util::md5_of_osrm_executables, nearest_response::NearestResponse, osm::OSMWay, + osrm_world::OSRMWorld, task_starter::TaskStarter, }; use core::panic; use cucumber::{gherkin::Step, given, when, World, WriterExt}; use futures::{future, FutureExt}; use geo_types::{point, Point}; use log::debug; -use std::{ - collections::HashMap, - fs::File, - io::Write, - time::Duration, -}; +use std::{collections::HashMap, fs::File, io::Write, time::Duration}; use ureq::Agent; const DEFAULT_ORIGIN: [f64; 2] = [1., 1.]; // TODO: move to world? @@ -266,7 +263,7 @@ fn main() { future::ready(()).boxed() }) - .with_writer(CustomWriter.normalized()) + .with_writer(DotWriter.normalized()) .run("features/nearest/pick.feature"), ); }