Skip to content

Commit

Permalink
Group imports by StdExternalCrate
Browse files Browse the repository at this point in the history
  • Loading branch information
msk committed Jun 3, 2024
1 parent c48b3db commit 5699b98
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
components: clippy, rustfmt
- name: Check formatting
run: cargo fmt -- --check
run: cargo fmt -- --check --config group_imports=StdExternalCrate
- name: Clippy
run: cargo clippy -- -D warnings -W clippy::pedantic
- name: markdownlint
Expand Down
3 changes: 2 additions & 1 deletion src/frame.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Functions and errors for handling length-delimited frames.

use std::{io, mem};

use bincode::Options;
use quinn::{RecvStream, SendStream};
use serde::{Deserialize, Serialize};
use std::{io, mem};

/// Receives and deserializes a message with a big-endian 4-byte length header.
///
Expand Down
6 changes: 4 additions & 2 deletions src/message.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
//! Functions and errors for handling messages.

use crate::frame;
use std::{fmt, io, mem};

use bincode::Options;
use quinn::{RecvStream, SendStream};
use serde::Serialize;
use std::{fmt, io, mem};

use crate::frame;

/// Receives a message as a stream of bytes with a big-endian 4-byte length
/// header.
Expand Down
3 changes: 2 additions & 1 deletion src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

use std::io;

use crate::{frame, message};
use bincode::Options;
use quinn::SendStream;
use serde::{Deserialize, Serialize};

use crate::{frame, message};

/// Parses the arguments of a request.
///
/// # Errors
Expand Down
4 changes: 3 additions & 1 deletion src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ lazy_static! {
/// Creates a bidirectional channel, returning server's send and receive and
/// client's send and receive streams.
pub(crate) async fn channel() -> Channel {
use rustls::pki_types::{CertificateDer, PrivatePkcs8KeyDer};
use std::{
net::{IpAddr, Ipv6Addr, SocketAddr},
sync::Arc,
};

use rustls::pki_types::{CertificateDer, PrivatePkcs8KeyDer};

const TEST_SERVER_NAME: &str = "test-server";
const TEST_PORT: u16 = 60190;

Expand Down

0 comments on commit 5699b98

Please sign in to comment.