Apply formatting again

pull/206/head
Chip Senkbeil 11 months ago
parent 3d8476f999
commit 6df19dfd9d
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

@ -31,9 +31,10 @@ async fn setup(api: impl DistantApi + Send + Sync + 'static) -> (DistantClient,
}
mod single {
use super::*;
use test_log::test;
use super::*;
#[test(tokio::test)]
async fn should_support_single_request_returning_error() {
struct TestDistantApi;
@ -71,12 +72,14 @@ mod single {
}
mod batch_parallel {
use super::*;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use distant_net::common::Request;
use distant_protocol::{Msg, Request as RequestPayload};
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use test_log::test;
use super::*;
#[test(tokio::test)]
async fn should_support_multiple_requests_running_in_parallel() {
struct TestDistantApi;
@ -185,12 +188,14 @@ mod batch_parallel {
}
mod batch_sequence {
use super::*;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use distant_net::common::Request;
use distant_protocol::{Msg, Request as RequestPayload};
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use test_log::test;
use super::*;
#[test(tokio::test)]
async fn should_support_multiple_requests_running_in_sequence() {
struct TestDistantApi;

@ -3,13 +3,13 @@ mod request;
mod response;
mod value;
use std::io::Cursor;
pub use header::*;
pub use request::*;
pub use response::*;
pub use value::*;
use std::io::Cursor;
/// Represents a generic id type
pub type Id = String;
@ -257,9 +257,10 @@ mod tests {
use super::*;
mod read_str_bytes {
use super::*;
use test_log::test;
use super::*;
#[test]
fn should_fail_if_input_is_empty() {
let input = read_str_bytes(&[]).unwrap_err();
@ -282,9 +283,10 @@ mod tests {
}
mod read_key_eq {
use super::*;
use test_log::test;
use super::*;
#[test]
fn should_fail_if_input_is_empty() {
let input = read_key_eq(&[], "key").unwrap_err();
@ -338,9 +340,10 @@ mod tests {
}
mod read_header_bytes {
use super::*;
use test_log::test;
use super::*;
#[test]
fn should_fail_if_input_is_empty() {
let input = vec![];
@ -527,9 +530,10 @@ mod tests {
}
mod find_msgpack_byte_len {
use super::*;
use test_log::test;
use super::*;
#[test]
fn should_return_none_if_input_is_empty() {
let input = vec![];

@ -1,11 +1,12 @@
use crate::common::{utils, Value};
use std::collections::HashMap;
use std::ops::{Deref, DerefMut};
use std::{fmt, io};
use derive_more::IntoIterator;
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fmt;
use std::io;
use std::ops::{Deref, DerefMut};
use crate::common::{utils, Value};
/// Generates a new [`Header`] of key/value pairs based on literals.
///

@ -1,10 +1,12 @@
use crate::common::utils;
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
use std::io;
use std::ops::{Deref, DerefMut};
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
use crate::common::utils;
/// Generic value type for data passed through header.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[serde(transparent)]

@ -1,6 +1,5 @@
use std::collections::HashMap;
use std::fmt;
use std::io;
use std::{fmt, io};
use log::*;
use tokio::sync::mpsc;

@ -1,6 +1,7 @@
use std::fmt;
use super::ServerReply;
use crate::common::{ConnectionId, Request};
use std::fmt;
/// Represents contextual information for working with an inbound request.
pub struct RequestCtx<T, U> {

@ -3,6 +3,7 @@ use std::net::IpAddr;
use std::ops::{Deref, DerefMut};
use std::pin::Pin;
use std::task::{Context, Poll};
use tokio::task::JoinError;
use super::ServerRef;

@ -3,6 +3,7 @@ use std::ops::{Deref, DerefMut};
use std::path::{Path, PathBuf};
use std::pin::Pin;
use std::task::{Context, Poll};
use tokio::task::JoinError;
use super::ServerRef;

@ -3,6 +3,7 @@ use std::future::Future;
use std::ops::{Deref, DerefMut};
use std::pin::Pin;
use std::task::{Context, Poll};
use tokio::task::JoinError;
use super::ServerRef;

@ -1,19 +1,16 @@
use std::collections::HashMap;
use std::io;
use std::io::Write;
use std::path::Path;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::time::Duration;
use anyhow::Context;
use distant_core::net::common::{ConnectionId, Host, Map, Request, Response};
use distant_core::net::manager::ManagerClient;
use distant_core::protocol::SearchQueryContentsMatch;
use distant_core::protocol::SearchQueryMatch;
use distant_core::protocol::SearchQueryPathMatch;
use distant_core::protocol::{
self, Capabilities, ChangeKind, ChangeKindSet, FileType, Permissions, SearchQuery,
SetPermissionsOptions, SystemInfo,
SearchQueryContentsMatch, SearchQueryMatch, SearchQueryPathMatch, SetPermissionsOptions,
SystemInfo,
};
use distant_core::{DistantChannel, DistantChannelExt, RemoteCommand, Searcher, Watcher};
use log::*;

Loading…
Cancel
Save