mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-15 17:00:33 +00:00
style: remove unused imports
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use bytes::Bytes;
|
||||
use sqlx_core::{ColumnIndex, Decode, Error, Result, Row, TypeDecode};
|
||||
use sqlx_core::{ColumnIndex, Result, Row, TypeDecode};
|
||||
|
||||
use crate::{protocol, MySql, MySqlColumn, MySqlRawValue, MySqlRawValueFormat};
|
||||
|
||||
@@ -42,12 +42,12 @@ impl MySqlRow {
|
||||
}
|
||||
|
||||
/// Returns the column at the index, if available.
|
||||
fn column<I: ColumnIndex<Self>>(&self, index: I) -> &MySqlColumn {
|
||||
pub fn column<I: ColumnIndex<Self>>(&self, index: I) -> &MySqlColumn {
|
||||
Row::column(self, index)
|
||||
}
|
||||
|
||||
/// Returns the column at the index, if available.
|
||||
fn try_column<I: ColumnIndex<Self>>(&self, index: I) -> Result<&MySqlColumn> {
|
||||
pub fn try_column<I: ColumnIndex<Self>>(&self, index: I) -> Result<&MySqlColumn> {
|
||||
Ok(&self.columns[index.get(self)?])
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
use std::str::from_utf8_unchecked;
|
||||
|
||||
use bytes::Bytes;
|
||||
use bytestring::ByteString;
|
||||
use sqlx_core::{decode, encode, Decode, Encode, Type};
|
||||
|
||||
|
||||
@@ -77,7 +77,9 @@ macro_rules! impl_type_uint {
|
||||
}
|
||||
|
||||
impl Encode<MySql> for $ty {
|
||||
fn encode(&self, _ty: &MySqlTypeInfo, out: &mut MySqlOutput<'_>) -> encode::Result<()> {
|
||||
fn encode(&self, ty: &MySqlTypeInfo, out: &mut MySqlOutput<'_>) -> encode::Result<()> {
|
||||
ensure_not_too_large((*self).into(), ty)?;
|
||||
|
||||
out.buffer().extend_from_slice(&self.to_le_bytes());
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user