mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-23 10:38:57 +00:00
style: rustfmt
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
use crate::protocol::backend::BackendMessageType;
|
||||
use sqlx_core::ClientError;
|
||||
use std::error::Error as StdError;
|
||||
use std::fmt::{self, Display, Formatter};
|
||||
use std::str::Utf8Error;
|
||||
|
||||
use sqlx_core::ClientError;
|
||||
|
||||
use crate::protocol::backend::BackendMessageType;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum PgClientError {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
@@ -22,10 +22,11 @@ impl Deserialize<'_> for KeyData {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::KeyData;
|
||||
use bytes::Bytes;
|
||||
use sqlx_core::io::Deserialize;
|
||||
|
||||
use super::KeyData;
|
||||
|
||||
#[test]
|
||||
fn should_deserialize() {
|
||||
let m = KeyData::deserialize(Bytes::from_static(b"\0\0'\xc6\x89R\xc5+")).unwrap();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt::Debug;
|
||||
|
||||
use crate::PgClientError;
|
||||
use bytes::Bytes;
|
||||
use sqlx_core::io::Deserialize;
|
||||
use sqlx_core::{Error, Result};
|
||||
|
||||
use crate::PgClientError;
|
||||
|
||||
/// Type of the *incoming* message.
|
||||
///
|
||||
/// Postgres does use the same message format for client and server messages but we are only
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::PgClientError;
|
||||
use bytes::{Buf, Bytes};
|
||||
use sqlx_core::io::Deserialize;
|
||||
use sqlx_core::{Error, Result};
|
||||
|
||||
use crate::PgClientError;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[repr(u8)]
|
||||
pub(crate) enum TransactionStatus {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use std::num::{NonZeroI16, NonZeroI32};
|
||||
|
||||
use bytes::{Buf, Bytes};
|
||||
use bytestring::ByteString;
|
||||
use sqlx_core::io::{BufExt, Deserialize};
|
||||
use sqlx_core::Result;
|
||||
use std::num::{NonZeroI16, NonZeroI32};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct RowDescription {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use sqlx_core::io::{Serialize, WriteExt};
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::{PortalRef, StatementRef};
|
||||
use crate::PgArguments;
|
||||
use sqlx_core::io::{Serialize, WriteExt};
|
||||
use sqlx_core::Result;
|
||||
|
||||
pub(crate) struct Bind<'a> {
|
||||
pub(crate) portal: PortalRef,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::Target;
|
||||
use sqlx_core::io::{Serialize, WriteExt};
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::Target;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Close {
|
||||
target: Target,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::Target;
|
||||
use sqlx_core::io::{Serialize, WriteExt};
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::Target;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Describe {
|
||||
target: Target,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::PortalRef;
|
||||
use sqlx_core::io::Serialize;
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::PortalRef;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Execute {
|
||||
pub(crate) portal: PortalRef,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::{PortalRef, StatementRef};
|
||||
use sqlx_core::io::{Serialize, WriteExt};
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::{PortalRef, StatementRef};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Parse<'a> {
|
||||
pub(crate) statement: StatementRef,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use md5::{Digest, Md5};
|
||||
use sqlx_core::io::Serialize;
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Password<'a>(pub(crate) &'a str);
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use sqlx_core::io::Serialize;
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Query<'a>(pub(crate) &'a str);
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::{PortalRef, StatementRef};
|
||||
use sqlx_core::io::Serialize;
|
||||
use sqlx_core::Result;
|
||||
|
||||
use crate::io::PgWriteExt;
|
||||
use crate::protocol::frontend::{PortalRef, StatementRef};
|
||||
|
||||
/// Target a command at a portal *or* statement.
|
||||
/// Used by [`Describe`] and [`Close`].
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user