Rename struct

This commit is contained in:
Dennis 2024-06-05 14:59:19 +02:00
parent 20708b0ff8
commit f1ad997a4b
No known key found for this signature in database
GPG Key ID: 6937EAEA33A3FA5D
2 changed files with 8 additions and 11 deletions

View File

@ -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<W: 'static> cucumber::Writer<W> for CustomWriter {
impl<W: 'static> cucumber::Writer<W> for DotWriter {
type Cli = cli::Empty; // we provide no CLI options
async fn handle_event(&mut self, ev: parser::Result<Event<event::Cucumber<W>>>, _: &Self::Cli) {

View File

@ -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"),
);
}