From ba703b78f544d0b55330f7da4481f4adbc1e4417 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Sat, 13 Apr 2024 11:55:05 +0100 Subject: [PATCH] fmt --- benchmark/src/bin/baseline.rs | 2 +- benchmark/src/bin/consumer.rs | 2 +- benchmark/src/bin/producer.rs | 2 +- benchmark/src/bin/relay.rs | 2 +- examples/src/bin/blocking.rs | 2 +- examples/src/bin/buffered.rs | 2 +- examples/src/bin/consumer.rs | 2 +- examples/src/bin/processor.rs | 2 +- examples/src/bin/producer.rs | 2 +- examples/src/bin/resumable.rs | 2 +- sea-streamer-file/src/bin/clock.rs | 2 +- sea-streamer-file/src/bin/decoder.rs | 2 +- sea-streamer-file/src/bin/sink.rs | 2 +- sea-streamer-file/src/bin/tail.rs | 2 +- sea-streamer-kafka/src/bin/consumer.rs | 2 +- sea-streamer-kafka/src/bin/producer.rs | 2 +- sea-streamer-redis/redis-streams-dump/src/main.rs | 2 +- sea-streamer-redis/src/bin/consumer.rs | 2 +- sea-streamer-redis/src/bin/producer.rs | 2 +- sea-streamer-socket/src/bin/relay.rs | 2 +- sea-streamer-stdio/src/bin/clock.rs | 2 +- sea-streamer-stdio/src/bin/complex.rs | 2 +- sea-streamer-stdio/src/bin/relay.rs | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/benchmark/src/bin/baseline.rs b/benchmark/src/bin/baseline.rs index d7d347f..d5dbf47 100644 --- a/benchmark/src/bin/baseline.rs +++ b/benchmark/src/bin/baseline.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{runtime::sleep, StreamUrl}; use std::time::Duration; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/benchmark/src/bin/consumer.rs b/benchmark/src/bin/consumer.rs index 720a3e9..2f26c74 100644 --- a/benchmark/src/bin/consumer.rs +++ b/benchmark/src/bin/consumer.rs @@ -1,9 +1,9 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{ Buffer, Consumer, ConsumerMode, ConsumerOptions, Message, SeaConsumer, SeaConsumerOptions, SeaMessage, SeaStreamReset, SeaStreamer, StreamUrl, Streamer, }; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/benchmark/src/bin/producer.rs b/benchmark/src/bin/producer.rs index a1fe0f5..5a384bc 100644 --- a/benchmark/src/bin/producer.rs +++ b/benchmark/src/bin/producer.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{Producer, SeaProducer, SeaStreamer, StreamUrl, Streamer}; use std::time::Duration; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/benchmark/src/bin/relay.rs b/benchmark/src/bin/relay.rs index 6d2817f..04d2239 100644 --- a/benchmark/src/bin/relay.rs +++ b/benchmark/src/bin/relay.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::stdio::StdioStreamer; use sea_streamer::{Consumer, Message, Producer, StreamKey, Streamer, StreamerUri}; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/examples/src/bin/blocking.rs b/examples/src/bin/blocking.rs index c63cdb5..4a9de3e 100644 --- a/examples/src/bin/blocking.rs +++ b/examples/src/bin/blocking.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use flume::bounded; use std::time::Duration; -use clap::Parser; use sea_streamer::{ runtime::{sleep, spawn_task}, diff --git a/examples/src/bin/buffered.rs b/examples/src/bin/buffered.rs index a969123..4e1959d 100644 --- a/examples/src/bin/buffered.rs +++ b/examples/src/bin/buffered.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use flume::bounded; use std::time::Duration; -use clap::Parser; use sea_streamer::{ runtime::{sleep, spawn_task}, diff --git a/examples/src/bin/consumer.rs b/examples/src/bin/consumer.rs index 35c7293..a68daf5 100644 --- a/examples/src/bin/consumer.rs +++ b/examples/src/bin/consumer.rs @@ -1,9 +1,9 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{ Buffer, Consumer, ConsumerMode, ConsumerOptions, Message, SeaConsumer, SeaConsumerOptions, SeaMessage, SeaStreamReset, SeaStreamer, StreamUrl, Streamer, }; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/examples/src/bin/processor.rs b/examples/src/bin/processor.rs index cd415b5..e173103 100644 --- a/examples/src/bin/processor.rs +++ b/examples/src/bin/processor.rs @@ -1,9 +1,9 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{ Buffer, Consumer, ConsumerMode, ConsumerOptions, Message, Producer, SeaConsumer, SeaConsumerOptions, SeaMessage, SeaProducer, SeaStreamer, StreamUrl, Streamer, }; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/examples/src/bin/producer.rs b/examples/src/bin/producer.rs index 0b9f48f..deca87e 100644 --- a/examples/src/bin/producer.rs +++ b/examples/src/bin/producer.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{Producer, SeaProducer, SeaStreamer, StreamUrl, Streamer}; use std::time::Duration; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/examples/src/bin/resumable.rs b/examples/src/bin/resumable.rs index 83d6a7e..636a580 100644 --- a/examples/src/bin/resumable.rs +++ b/examples/src/bin/resumable.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use clap::Parser; use sea_streamer::{ kafka::AutoOffsetReset, redis::{AutoCommit, AutoStreamReset}, @@ -7,7 +8,6 @@ use sea_streamer::{ Streamer, }; use std::time::Duration; -use clap::Parser; const TRANSACTION: bool = true; diff --git a/sea-streamer-file/src/bin/clock.rs b/sea-streamer-file/src/bin/clock.rs index d377860..88b6255 100644 --- a/sea-streamer-file/src/bin/clock.rs +++ b/sea-streamer-file/src/bin/clock.rs @@ -1,8 +1,8 @@ use anyhow::{anyhow, Result}; +use clap::Parser; use sea_streamer_file::{FileId, FileStreamer}; use sea_streamer_types::{Producer, StreamKey, Streamer}; use std::time::Duration; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-file/src/bin/decoder.rs b/sea-streamer-file/src/bin/decoder.rs index c9c3cfa..b7ccf9a 100644 --- a/sea-streamer-file/src/bin/decoder.rs +++ b/sea-streamer-file/src/bin/decoder.rs @@ -16,12 +16,12 @@ //! /* beacon */ //! ``` use anyhow::Result; +use clap::Parser; use sea_streamer_file::{ format::MessageJson, is_end_of_stream, FileErr, FileId, MessageSource, StreamMode, }; use sea_streamer_types::{Buffer, Message, TIMESTAMP_FORMAT}; use std::str::FromStr; -use clap::Parser; #[derive(Parser)] struct Args { diff --git a/sea-streamer-file/src/bin/sink.rs b/sea-streamer-file/src/bin/sink.rs index 33e86e5..9fb69f5 100644 --- a/sea-streamer-file/src/bin/sink.rs +++ b/sea-streamer-file/src/bin/sink.rs @@ -1,8 +1,8 @@ use anyhow::{anyhow, Result}; +use clap::Parser; use sea_streamer_file::{FileId, MessageSink, DEFAULT_BEACON_INTERVAL, DEFAULT_FILE_SIZE_LIMIT}; use sea_streamer_types::{MessageHeader, OwnedMessage, ShardId, StreamKey, Timestamp}; use std::time::Duration; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-file/src/bin/tail.rs b/sea-streamer-file/src/bin/tail.rs index bc1f3df..d292d3f 100644 --- a/sea-streamer-file/src/bin/tail.rs +++ b/sea-streamer-file/src/bin/tail.rs @@ -1,7 +1,7 @@ //! A for demo `tail -f` program. use anyhow::Result; -use sea_streamer_file::{FileId, FileSource, ReadFrom}; use clap::Parser; +use sea_streamer_file::{FileId, FileSource, ReadFrom}; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-kafka/src/bin/consumer.rs b/sea-streamer-kafka/src/bin/consumer.rs index f53a0e0..eaf1eff 100644 --- a/sea-streamer-kafka/src/bin/consumer.rs +++ b/sea-streamer-kafka/src/bin/consumer.rs @@ -1,9 +1,9 @@ use anyhow::Result; +use clap::Parser; use sea_streamer_kafka::{AutoOffsetReset, KafkaConsumerOptions, KafkaStreamer}; use sea_streamer_types::{ Buffer, Consumer, ConsumerMode, ConsumerOptions, Message, StreamUrl, Streamer, }; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-kafka/src/bin/producer.rs b/sea-streamer-kafka/src/bin/producer.rs index aec3362..df45255 100644 --- a/sea-streamer-kafka/src/bin/producer.rs +++ b/sea-streamer-kafka/src/bin/producer.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer_kafka::KafkaStreamer; use sea_streamer_types::{Producer, StreamUrl, Streamer}; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-redis/redis-streams-dump/src/main.rs b/sea-streamer-redis/redis-streams-dump/src/main.rs index 43ffd07..7489155 100644 --- a/sea-streamer-redis/redis-streams-dump/src/main.rs +++ b/sea-streamer-redis/redis-streams-dump/src/main.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use clap::Parser; use sea_streamer_file::{FileId, MessageSink, DEFAULT_BEACON_INTERVAL, DEFAULT_FILE_SIZE_LIMIT}; use sea_streamer_redis::{AutoStreamReset, RedisConsumerOptions, RedisStreamer}; use sea_streamer_types::{ @@ -6,7 +7,6 @@ use sea_streamer_types::{ TIMESTAMP_FORMAT, }; use std::time::Duration; -use clap::Parser; use time::PrimitiveDateTime; #[derive(Debug, Parser)] diff --git a/sea-streamer-redis/src/bin/consumer.rs b/sea-streamer-redis/src/bin/consumer.rs index 4e16bf7..399ad32 100644 --- a/sea-streamer-redis/src/bin/consumer.rs +++ b/sea-streamer-redis/src/bin/consumer.rs @@ -1,9 +1,9 @@ use anyhow::Result; +use clap::Parser; use sea_streamer_redis::{AutoStreamReset, RedisConsumerOptions, RedisStreamer}; use sea_streamer_types::{ Buffer, Consumer, ConsumerMode, ConsumerOptions, Message, StreamUrl, Streamer, }; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-redis/src/bin/producer.rs b/sea-streamer-redis/src/bin/producer.rs index eac05fb..aa78fde 100644 --- a/sea-streamer-redis/src/bin/producer.rs +++ b/sea-streamer-redis/src/bin/producer.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer_redis::RedisStreamer; use sea_streamer_types::{Producer, StreamUrl, Streamer}; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-socket/src/bin/relay.rs b/sea-streamer-socket/src/bin/relay.rs index 168aa0e..75ba78f 100644 --- a/sea-streamer-socket/src/bin/relay.rs +++ b/sea-streamer-socket/src/bin/relay.rs @@ -1,10 +1,10 @@ use anyhow::{bail, Result}; +use clap::Parser; use sea_streamer_socket::{SeaConsumerOptions, SeaStreamer}; use sea_streamer_types::{ Consumer, ConsumerMode, ConsumerOptions, Message, Producer, StreamUrl, Streamer, }; use std::str::FromStr; -use clap::Parser; #[cfg(feature = "backend-kafka")] use sea_streamer_kafka::AutoOffsetReset; diff --git a/sea-streamer-stdio/src/bin/clock.rs b/sea-streamer-stdio/src/bin/clock.rs index eb05650..11e20b9 100644 --- a/sea-streamer-stdio/src/bin/clock.rs +++ b/sea-streamer-stdio/src/bin/clock.rs @@ -1,8 +1,8 @@ use anyhow::{anyhow, Result}; +use clap::Parser; use sea_streamer_stdio::StdioStreamer; use sea_streamer_types::{Producer, StreamKey, Streamer, StreamerUri}; use std::time::Duration; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-stdio/src/bin/complex.rs b/sea-streamer-stdio/src/bin/complex.rs index 693e7d7..dd98a6a 100644 --- a/sea-streamer-stdio/src/bin/complex.rs +++ b/sea-streamer-stdio/src/bin/complex.rs @@ -1,12 +1,12 @@ //! This is just to demonstrate the more complex behaviour of the streamer. //! Should later put this under a test framework that can manage subprocesses. use anyhow::Result; +use clap::Parser; use sea_streamer_stdio::{StdioConsumerOptions, StdioStreamer}; use sea_streamer_types::{ Consumer, ConsumerGroup, ConsumerMode, ConsumerOptions, Message, Producer, StreamKey, Streamer, StreamerUri, }; -use clap::Parser; #[derive(Debug, Parser)] struct Args { diff --git a/sea-streamer-stdio/src/bin/relay.rs b/sea-streamer-stdio/src/bin/relay.rs index 1fa7db0..a6f413c 100644 --- a/sea-streamer-stdio/src/bin/relay.rs +++ b/sea-streamer-stdio/src/bin/relay.rs @@ -1,7 +1,7 @@ use anyhow::Result; +use clap::Parser; use sea_streamer_stdio::StdioStreamer; use sea_streamer_types::{Consumer, Message, Producer, StreamKey, Streamer, StreamerUri}; -use clap::Parser; #[derive(Debug, Parser)] struct Args {