Skip to content

Commit 73bbcc5

Browse files
committed
run cargo fmt
1 parent 6452ef6 commit 73bbcc5

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

src/config/watcher.rs

+26-9
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,12 @@ mod tests {
200200
)
201201
}
202202

203-
async fn test_component_reload(file: &mut File,
204-
expected_component: &ComponentKey,
205-
timeout: Duration,
206-
mut receiver: SignalRx) -> bool {
203+
async fn test_component_reload(
204+
file: &mut File,
205+
expected_component: &ComponentKey,
206+
timeout: Duration,
207+
mut receiver: SignalRx,
208+
) -> bool {
207209
file.write_all(&[0]).unwrap();
208210
file.sync_all().unwrap();
209211

@@ -228,9 +230,10 @@ mod tests {
228230
ComponentConfig::new(component_file_path.clone(), http_component.clone());
229231
std::fs::create_dir(&dir).unwrap();
230232
let mut file = File::create(&file_path).unwrap();
231-
let mut component_files: Vec<std::fs::File> = component_file_path.iter().map(|file| {
232-
File::create(&file).unwrap()
233-
}).collect();
233+
let mut component_files: Vec<std::fs::File> = component_file_path
234+
.iter()
235+
.map(|file| File::create(&file).unwrap())
236+
.collect();
234237

235238
let (signal_tx, signal_rx) = broadcast::channel(128);
236239
spawn_thread(
@@ -245,11 +248,25 @@ mod tests {
245248
let signal_rx2 = signal_rx.resubscribe();
246249
let signal_rx3 = signal_rx.resubscribe();
247250

248-
if !test_component_reload(&mut component_files[0], &http_component, delay * 5, signal_rx).await {
251+
if !test_component_reload(
252+
&mut component_files[0],
253+
&http_component,
254+
delay * 5,
255+
signal_rx,
256+
)
257+
.await
258+
{
249259
panic!("Test timed out");
250260
}
251261

252-
if !test_component_reload(&mut component_files[1], &http_component, delay * 5, signal_rx2).await {
262+
if !test_component_reload(
263+
&mut component_files[1],
264+
&http_component,
265+
delay * 5,
266+
signal_rx2,
267+
)
268+
.await
269+
{
253270
panic!("Test timed out");
254271
}
255272

0 commit comments

Comments
 (0)