Skip to content

Commit 1dc5aba

Browse files
committed
doc: Fix broken reference
1 parent 5d4e87b commit 1dc5aba

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

odbc-api/src/connection.rs

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use crate::{
55
execute_columns, execute_foreign_keys, execute_tables, execute_with_parameters_polling,
66
},
77
handles::{
8-
self, SqlText, State, Statement, StatementConnection, StatementImpl,
9-
StatementParent, slice_to_utf8,
8+
self, SqlText, State, Statement, StatementConnection, StatementImpl, StatementParent,
9+
slice_to_utf8,
1010
},
1111
};
1212
use log::error;
@@ -774,7 +774,7 @@ unsafe impl StatementParent for Connection<'_> {}
774774

775775
/// We need to implement [`StatementParent`] for `Arc<Connection>` in order to be able to express
776776
/// ownership of a shared connection from a statement handle. This is e.g. needed for
777-
/// [`ConnectionTransition::into_cursor`].
777+
/// [`ConnectionTransitions::into_cursor`].
778778
///
779779
/// # Safety:
780780
///
@@ -967,7 +967,10 @@ pub trait ConnectionTransitions: Sized {
967967
query: &str,
968968
params: impl ParameterCollectionRef,
969969
query_timeout_sec: Option<usize>,
970-
) -> Result<Option<CursorImpl<StatementConnection<Self::StatementParent>>>, FailedStateTransition<Self>>;
970+
) -> Result<
971+
Option<CursorImpl<StatementConnection<Self::StatementParent>>>,
972+
FailedStateTransition<Self>,
973+
>;
971974

972975
/// Prepares an SQL statement which takes ownership of the connection. The advantage over
973976
/// [`Connection::prepare`] is, that you do not need to keep track of the lifetime of the
@@ -1018,7 +1021,9 @@ pub trait ConnectionTransitions: Sized {
10181021

10191022
/// Creates a preallocated statement handle like [`Connection::preallocate`]. Yet the statement
10201023
/// also takes ownership of the connection.
1021-
fn into_preallocated(self) -> Result<Preallocated<StatementConnection<Self::StatementParent>>, Error>;
1024+
fn into_preallocated(
1025+
self,
1026+
) -> Result<Preallocated<StatementConnection<Self::StatementParent>>, Error>;
10221027
}
10231028

10241029
impl<'env> ConnectionTransitions for Connection<'env> {
@@ -1029,15 +1034,11 @@ impl<'env> ConnectionTransitions for Connection<'env> {
10291034
query: &str,
10301035
params: impl ParameterCollectionRef,
10311036
query_timeout_sec: Option<usize>,
1032-
) -> Result<Option<CursorImpl<StatementConnection<Self>>>, FailedStateTransition<Self>>
1033-
{
1037+
) -> Result<Option<CursorImpl<StatementConnection<Self>>>, FailedStateTransition<Self>> {
10341038
self.into_cursor(query, params, query_timeout_sec)
10351039
}
10361040

1037-
fn into_prepared(
1038-
self,
1039-
query: &str,
1040-
) -> Result<Prepared<StatementConnection<Self>>, Error> {
1041+
fn into_prepared(self, query: &str) -> Result<Prepared<StatementConnection<Self>>, Error> {
10411042
self.into_prepared(query)
10421043
}
10431044

@@ -1054,8 +1055,7 @@ impl<'env> ConnectionTransitions for Arc<Connection<'env>> {
10541055
query: &str,
10551056
params: impl ParameterCollectionRef,
10561057
query_timeout_sec: Option<usize>,
1057-
) -> Result<Option<CursorImpl<StatementConnection<Self>>>, FailedStateTransition<Self>>
1058-
{
1058+
) -> Result<Option<CursorImpl<StatementConnection<Self>>>, FailedStateTransition<Self>> {
10591059
// Result borrows the connection. We convert the cursor into a raw pointer, to not confuse
10601060
// the borrow checker.
10611061
let result = self.execute(query, params, query_timeout_sec);
@@ -1079,10 +1079,7 @@ impl<'env> ConnectionTransitions for Arc<Connection<'env>> {
10791079
Ok(Some(cursor))
10801080
}
10811081

1082-
fn into_prepared(
1083-
self,
1084-
query: &str,
1085-
) -> Result<Prepared<StatementConnection<Self>>, Error> {
1082+
fn into_prepared(self, query: &str) -> Result<Prepared<StatementConnection<Self>>, Error> {
10861083
let stmt = self.prepare(query)?;
10871084
let stmt_ptr = stmt.into_handle().into_sys();
10881085
// Safe: The connection is the parent of the statement referenced by `stmt_ptr`.

0 commit comments

Comments
 (0)