Skip to content

Commit

Permalink
consistent formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
msrd0 committed Apr 17, 2024
1 parent 8e42df6 commit 9058967
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
33 changes: 13 additions & 20 deletions gotham/benches/file_handler.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
use std::{
collections::HashMap,
fs::File,
io::{BufWriter, Write},
net::{SocketAddr, ToSocketAddrs},
sync::atomic::{AtomicU64, Ordering::Relaxed},
time::{Duration, SystemTime},
};
use std::collections::HashMap;
use std::fs::File;
use std::io::{BufWriter, Write};
use std::net::{SocketAddr, ToSocketAddrs};
use std::sync::atomic::AtomicU64;
use std::sync::atomic::Ordering::Relaxed;
use std::time::{Duration, SystemTime};

use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
use futures_util::future;
use gotham::{
bind_server,
handler::FileOptions,
router::{
build_simple_router,
builder::{DefineSingleRoute, DrawRoutes},
},
};
use gotham::bind_server;
use gotham::handler::FileOptions;
use gotham::router::build_simple_router;
use gotham::router::builder::{DefineSingleRoute, DrawRoutes};
use tempfile::TempDir;
use tokio::{
net::TcpListener,
runtime::{self, Runtime},
};
use tokio::net::TcpListener;
use tokio::runtime::{self, Runtime};

struct BenchServer {
runtime: Runtime,
Expand Down
8 changes: 8 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
edition = "2018"

# this rustfmt config does set some nightly flags but don't worry
# you can still use stable rustfmt and it will just ignore these
# we don't require you to have these enabled
unstable_features = true
format_code_in_doc_comments = true
imports_granularity = "Module"

0 comments on commit 9058967

Please sign in to comment.