Rename struct
This commit is contained in:
		
							parent
							
								
									20708b0ff8
								
							
						
					
					
						commit
						f1ad997a4b
					
				| @ -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) { | ||||
|  | ||||
| @ -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"), | ||||
|     ); | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user