Minor test fixes

This commit is contained in:
Georg Semmler 2023-01-02 09:55:49 +01:00
parent 464ef34c27
commit 58df7d537b
No known key found for this signature in database
GPG Key ID: A87BCEE5205CE489
4 changed files with 5 additions and 8 deletions

View File

@ -12,7 +12,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi
### Changed
* The minimal officially supported rustc version is now 1.60.0
* The minimal officially supported rustc version is now 1.65.0
### Added

View File

@ -316,7 +316,7 @@ pub use diesel_derives::Queryable;
/// DB: Backend,
/// String: FromSql<ST, DB>,
/// {
/// fn from_sql(bytes: backend::RawValue<DB>) -> deserialize::Result<Self> {
/// fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
/// String::from_sql(bytes)
/// .map(|s| LowercaseString(s.to_lowercase()))
/// }
@ -400,7 +400,7 @@ pub use diesel_derives::QueryableByName;
/// DB: Backend,
/// i32: FromSql<Integer, DB>,
/// {
/// fn from_sql(bytes: backend::RawValue<DB>) -> deserialize::Result<Self> {
/// fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
/// match i32::from_sql(bytes)? {
/// 1 => Ok(MyEnum::A),
/// 2 => Ok(MyEnum::B),

View File

@ -290,7 +290,6 @@ pub mod helper_types {
use super::query_dsl::methods::*;
use super::query_dsl::*;
use super::query_source::{aliasing, joins};
use crate::connection::DefaultLoadingMode;
use crate::query_builder::select_clause::SelectClause;
#[doc(inline)]
@ -475,7 +474,7 @@ pub mod helper_types {
#[doc(hidden)]
#[cfg(all(feature = "with-deprecated", not(feature = "without-deprecated")))]
#[deprecated(note = "Use `LoadQuery::RowIter` directly")]
pub type LoadIter<'conn, 'query, Q, Conn, U, B = DefaultLoadingMode> =
pub type LoadIter<'conn, 'query, Q, Conn, U, B = crate::connection::DefaultLoadingMode> =
<Q as load_dsl::LoadQuery<'query, Conn, U, B>>::RowIter<'conn>;
}

View File

@ -82,9 +82,7 @@ impl<'a, 'b, DB: Backend> Output<'a, 'b, DB> {
impl<'a, DB: Backend> Output<'a, 'static, DB> {
/// Returns a `Output` suitable for testing `ToSql` implementations.
/// Unsafe to use for testing types which perform dynamic metadata lookup.
pub fn test(
buffer: <crate::backend::BindCollector<'a, DB> as BindCollector<'a, DB>>::Buffer,
) -> Self {
pub fn test(buffer: <DB::BindCollector<'a> as BindCollector<'a, DB>>::Buffer) -> Self {
Self {
out: buffer,
metadata_lookup: None,