From 347bd5777a81da44b396d4c1a226c538664bb9ba Mon Sep 17 00:00:00 2001 From: Joey de Waal Date: Thu, 23 Oct 2025 23:33:29 +0200 Subject: [PATCH] fix spelling --- examples/postgres/axum-social-with-tests/src/http/error.rs | 2 +- examples/postgres/files/src/main.rs | 2 +- sqlx-cli/tests/ignored-chars/sqlx.toml | 2 +- sqlx-core/src/config/reference.toml | 2 +- sqlx-core/src/error.rs | 2 +- sqlx-mysql/src/migrate.rs | 4 ++-- sqlx-mysql/src/protocol/statement/row.rs | 2 +- sqlx-mysql/src/protocol/text/column.rs | 2 +- sqlx-postgres/src/any.rs | 4 ++-- sqlx-postgres/src/message/sasl.rs | 2 +- sqlx-postgres/src/migrate.rs | 2 +- sqlx-postgres/src/options/pgpass.rs | 4 ++-- sqlx-postgres/src/types/geometry/polygon.rs | 2 +- tests/postgres/postgres.rs | 4 ++-- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/postgres/axum-social-with-tests/src/http/error.rs b/examples/postgres/axum-social-with-tests/src/http/error.rs index fc4fd5ea1f..51e0208e5a 100644 --- a/examples/postgres/axum-social-with-tests/src/http/error.rs +++ b/examples/postgres/axum-social-with-tests/src/http/error.rs @@ -11,7 +11,7 @@ pub enum Error { /// A SQLx call returned an error. /// /// The exact error contents are not reported to the user in order to avoid leaking - /// information about databse internals. + /// information about database internals. #[error("an internal database error occurred")] Sqlx(#[from] sqlx::Error), diff --git a/examples/postgres/files/src/main.rs b/examples/postgres/files/src/main.rs index 65e92190d8..194d823fd7 100644 --- a/examples/postgres/files/src/main.rs +++ b/examples/postgres/files/src/main.rs @@ -30,7 +30,7 @@ impl Display for PostWithAuthorQuery { async fn main() -> anyhow::Result<()> { let pool = PgPool::connect(&dotenvy::var("DATABASE_URL")?).await?; - // we can use a tranditional wrapper around the `query!()` macro using files + // we can use a traditional wrapper around the `query!()` macro using files query_file!("queries/insert_seed_data.sql") .execute(&pool) .await?; diff --git a/sqlx-cli/tests/ignored-chars/sqlx.toml b/sqlx-cli/tests/ignored-chars/sqlx.toml index e5278d283f..f331e5b7a4 100644 --- a/sqlx-cli/tests/ignored-chars/sqlx.toml +++ b/sqlx-cli/tests/ignored-chars/sqlx.toml @@ -1,5 +1,5 @@ [migrate] -# Ignore common whitespace characters (beware syntatically significant whitespace!) +# Ignore common whitespace characters (beware syntactically significant whitespace!) # Space, tab, CR, LF, zero-width non-breaking space (U+FEFF) # # U+FEFF is added by some editors as a magic number at the beginning of a text file indicating it is UTF-8 encoded, diff --git a/sqlx-core/src/config/reference.toml b/sqlx-core/src/config/reference.toml index f0acbdbe6a..00f0af9285 100644 --- a/sqlx-core/src/config/reference.toml +++ b/sqlx-core/src/config/reference.toml @@ -206,7 +206,7 @@ migrations-dir = "foo/migrations" # Note that the TOML format requires double-quoted strings to process escapes. # ignored-chars = ["\r"] -# Ignore common whitespace characters (beware syntatically significant whitespace!) +# Ignore common whitespace characters (beware syntactically significant whitespace!) # Space, tab, CR, LF, zero-width non-breaking space (U+FEFF) # # U+FEFF is added by some editors as a magic number at the beginning of a text file indicating it is UTF-8 encoded, diff --git a/sqlx-core/src/error.rs b/sqlx-core/src/error.rs index c6652aef75..8c6f424cdf 100644 --- a/sqlx-core/src/error.rs +++ b/sqlx-core/src/error.rs @@ -84,7 +84,7 @@ pub enum Error { source: BoxDynError, }, - /// Error occured while encoding a value. + /// Error occurred while encoding a value. #[error("error occurred while encoding a value: {0}")] Encode(#[source] BoxDynError), diff --git a/sqlx-mysql/src/migrate.rs b/sqlx-mysql/src/migrate.rs index 0176f93c26..7424dfe27f 100644 --- a/sqlx-mysql/src/migrate.rs +++ b/sqlx-mysql/src/migrate.rs @@ -193,7 +193,7 @@ CREATE TABLE IF NOT EXISTS {table_name} ( migration: &'e Migration, ) -> BoxFuture<'e, Result> { Box::pin(async move { - // Use a single transaction for the actual migration script and the essential bookeeping so we never + // Use a single transaction for the actual migration script and the essential bookkeeping so we never // execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966. // The `execution_time` however can only be measured for the whole transaction. This value _only_ exists for // data lineage and debugging reasons, so it is not super important if it is lost. So we initialize it to -1 @@ -268,7 +268,7 @@ CREATE TABLE IF NOT EXISTS {table_name} ( migration: &'e Migration, ) -> BoxFuture<'e, Result> { Box::pin(async move { - // Use a single transaction for the actual migration script and the essential bookeeping so we never + // Use a single transaction for the actual migration script and the essential bookkeeping so we never // execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966. let mut tx = self.begin().await?; let start = Instant::now(); diff --git a/sqlx-mysql/src/protocol/statement/row.rs b/sqlx-mysql/src/protocol/statement/row.rs index 3007884c72..a55701fe19 100644 --- a/sqlx-mysql/src/protocol/statement/row.rs +++ b/sqlx-mysql/src/protocol/statement/row.rs @@ -18,7 +18,7 @@ impl<'de> ProtocolDecode<'de, &'de [MySqlColumn]> for BinaryRow { let header = buf.get_u8(); if header != 0 { return Err(err_protocol!( - "exepcted 0x00 (ROW) but found 0x{:02x}", + "expected 0x00 (ROW) but found 0x{:02x}", header )); } diff --git a/sqlx-mysql/src/protocol/text/column.rs b/sqlx-mysql/src/protocol/text/column.rs index 6ff65b3fcc..6e33713880 100644 --- a/sqlx-mysql/src/protocol/text/column.rs +++ b/sqlx-mysql/src/protocol/text/column.rs @@ -41,7 +41,7 @@ bitflags! { /// Field is an enumeration. const ENUM = 256; - /// Field is an auto-incement field. + /// Field is an auto-increment field. const AUTO_INCREMENT = 512; /// Field is a timestamp. diff --git a/sqlx-postgres/src/any.rs b/sqlx-postgres/src/any.rs index 51eb15d2a7..1f248505ae 100644 --- a/sqlx-postgres/src/any.rs +++ b/sqlx-postgres/src/any.rs @@ -136,8 +136,8 @@ impl AnyConnectionBackend for PgConnection { ) -> BoxFuture<'c, sqlx_core::Result> { Box::pin(async move { let statement = Executor::prepare_with(self, sql, &[]).await?; - let colunn_names = statement.metadata.column_names.clone(); - AnyStatement::try_from_statement(statement, colunn_names) + let column_names = statement.metadata.column_names.clone(); + AnyStatement::try_from_statement(statement, column_names) }) } diff --git a/sqlx-postgres/src/message/sasl.rs b/sqlx-postgres/src/message/sasl.rs index 9d393189bf..5593a9367a 100644 --- a/sqlx-postgres/src/message/sasl.rs +++ b/sqlx-postgres/src/message/sasl.rs @@ -41,7 +41,7 @@ impl FrontendMessage for SaslInitialResponse<'_> { let response_len = i32::try_from(self.response.len()).map_err(|_| { err_protocol!( - "SASL Initial Response length too long for protcol: {}", + "SASL Initial Response length too long for protocol: {}", self.response.len() ) })?; diff --git a/sqlx-postgres/src/migrate.rs b/sqlx-postgres/src/migrate.rs index 49104672c7..f4e55a36e6 100644 --- a/sqlx-postgres/src/migrate.rs +++ b/sqlx-postgres/src/migrate.rs @@ -231,7 +231,7 @@ CREATE TABLE IF NOT EXISTS {table_name} ( if migration.no_tx { execute_migration(self, table_name, migration).await?; } else { - // Use a single transaction for the actual migration script and the essential bookeeping so we never + // Use a single transaction for the actual migration script and the essential bookkeeping so we never // execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966. // The `execution_time` however can only be measured for the whole transaction. This value _only_ exists for // data lineage and debugging reasons, so it is not super important if it is lost. So we initialize it to -1 diff --git a/sqlx-postgres/src/options/pgpass.rs b/sqlx-postgres/src/options/pgpass.rs index bf16559548..930c5f0f51 100644 --- a/sqlx-postgres/src/options/pgpass.rs +++ b/sqlx-postgres/src/options/pgpass.rs @@ -173,8 +173,8 @@ fn find_next_field<'a>(line: &mut &'a str) -> Option> { let mut escaped_string = None; let mut last_added = 0; - let char_indicies = line.char_indices(); - for (idx, c) in char_indicies { + let char_indices = line.char_indices(); + for (idx, c) in char_indices { if c == ':' && !escaping { let (field, rest) = line.split_at(idx); *line = &rest[1..]; diff --git a/sqlx-postgres/src/types/geometry/polygon.rs b/sqlx-postgres/src/types/geometry/polygon.rs index e612b93499..5ca97477ea 100644 --- a/sqlx-postgres/src/types/geometry/polygon.rs +++ b/sqlx-postgres/src/types/geometry/polygon.rs @@ -15,7 +15,7 @@ const BYTE_WIDTH: usize = mem::size_of::(); /// Description: Polygon (similar to closed polygon) /// Representation: `((x1,y1),...)` /// -/// Polygons are represented by lists of points (the vertexes of the polygon). Polygons are very similar to closed paths; the essential semantic difference is that a polygon is considered to include the area within it, while a path is not. +/// Polygons are represented by lists of points (the vertices of the polygon). Polygons are very similar to closed paths; the essential semantic difference is that a polygon is considered to include the area within it, while a path is not. /// An important implementation difference between polygons and paths is that the stored representation of a polygon includes its smallest bounding box. This speeds up certain search operations, although computing the bounding box adds overhead while constructing new polygons. /// Values of type polygon are specified using any of the following syntaxes: /// diff --git a/tests/postgres/postgres.rs b/tests/postgres/postgres.rs index 8324982b67..06adf0ca7f 100644 --- a/tests/postgres/postgres.rs +++ b/tests/postgres/postgres.rs @@ -417,7 +417,7 @@ async fn copy_can_work_with_failed_transactions() -> anyhow::Result<()> { tx.rollback().await?; - // conn should be usable again, as we explictly rolled back the transaction + // conn should be usable again, as we explicitly rolled back the transaction let got: i32 = sqlx::query_scalar("SELECT 1") .fetch_one(conn.as_mut()) .await?; @@ -445,7 +445,7 @@ async fn it_can_work_with_failed_transactions() -> anyhow::Result<()> { .is_err()); tx.rollback().await?; - // conn should be usable again, as we explictly rolled back the transaction + // conn should be usable again, as we explicitly rolled back the transaction let got: i32 = sqlx::query_scalar("SELECT 1") .fetch_one(conn.as_mut()) .await?;