mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 07:21:08 +00:00
Remove unused imports and a couple unused muts
This commit is contained in:
parent
06d6969929
commit
4ced4058ac
@ -121,7 +121,7 @@ impl MySqlConnection {
|
||||
// We must have a separate buffer around the stream as we can't operate directly
|
||||
// on bytes returned from the stream. We have various kinds of payload manipulation
|
||||
// that must be handled before decoding.
|
||||
let mut payload = ret_if_none!(self.stream.peek(self.packet_len).await?);
|
||||
let payload = ret_if_none!(self.stream.peek(self.packet_len).await?);
|
||||
self.packet.extend_from_slice(payload);
|
||||
self.stream.consume(self.packet_len);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use byteorder::{BigEndian, ByteOrder, LittleEndian};
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use chrono::{DateTime, Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike, Utc};
|
||||
|
||||
use crate::decode::{Decode, DecodeError};
|
||||
|
@ -22,7 +22,7 @@ impl Encode<MySql> for i8 {
|
||||
}
|
||||
|
||||
impl Decode<MySql> for i8 {
|
||||
fn decode(mut buf: &[u8]) -> Result<Self, DecodeError> {
|
||||
fn decode(buf: &[u8]) -> Result<Self, DecodeError> {
|
||||
Ok(buf[0] as i8)
|
||||
}
|
||||
}
|
||||
|
@ -10,13 +10,14 @@ use proc_macro_hack::proc_macro_hack;
|
||||
|
||||
use quote::quote;
|
||||
|
||||
use syn::{parse, parse_macro_input};
|
||||
use syn::parse_macro_input;
|
||||
|
||||
use async_std::task;
|
||||
|
||||
use url::Url;
|
||||
|
||||
type Error = Box<dyn std::error::Error>;
|
||||
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
mod database;
|
||||
|
@ -1,5 +1,3 @@
|
||||
use std::path::Path;
|
||||
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::{quote, quote_spanned, ToTokens};
|
||||
use syn::spanned::Spanned;
|
||||
|
@ -5,7 +5,7 @@ use proc_macro2::Span;
|
||||
use syn::parse::{Parse, ParseStream};
|
||||
use syn::punctuated::Punctuated;
|
||||
use syn::Token;
|
||||
use syn::{Expr, ExprLit, ExprPath, Lit, Path};
|
||||
use syn::{Expr, ExprLit, ExprPath, Lit};
|
||||
|
||||
use sqlx::describe::Describe;
|
||||
use sqlx::Connection;
|
||||
|
@ -1,14 +1,13 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use proc_macro2::{Ident, Span, TokenStream};
|
||||
use quote::{format_ident, quote};
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::quote;
|
||||
|
||||
pub use input::{QueryAsMacroInput, QueryMacroInput};
|
||||
pub use query::expand_query;
|
||||
|
||||
use crate::database::DatabaseExt;
|
||||
|
||||
use sqlx::describe::Describe;
|
||||
use sqlx::types::HasTypeMetadata;
|
||||
use sqlx::Connection;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use proc_macro2::{Ident, TokenStream};
|
||||
use quote::quote;
|
||||
use syn::{Path, Token};
|
||||
use syn::Path;
|
||||
|
||||
use sqlx::describe::Describe;
|
||||
|
||||
|
@ -2,18 +2,13 @@ use std::fmt::Display;
|
||||
|
||||
use proc_macro2::Span;
|
||||
use proc_macro2::TokenStream;
|
||||
use syn::{
|
||||
parse::{self, Parse, ParseStream},
|
||||
punctuated::Punctuated,
|
||||
spanned::Spanned,
|
||||
Expr, ExprLit, Ident, Lit, Path, Token,
|
||||
};
|
||||
use syn::{Ident, Path};
|
||||
|
||||
use quote::{format_ident, quote, quote_spanned, ToTokens};
|
||||
use sqlx::{describe::Describe, types::HasTypeMetadata, Connection};
|
||||
use quote::quote;
|
||||
use sqlx::{types::HasTypeMetadata, Connection};
|
||||
|
||||
use super::{args, output, QueryMacroInput};
|
||||
use crate::database::{DatabaseExt, ParamChecking};
|
||||
use crate::database::DatabaseExt;
|
||||
|
||||
/// Given an input like `query!("SELECT * FROM accounts WHERE account_id > ?", account_id)`,
|
||||
/// expand to an anonymous record
|
||||
|
Loading…
x
Reference in New Issue
Block a user