Skip to content

Commit 205c44f

Browse files
authored
Merge pull request diesel-rs#1446 from martinlindhe/master
fix some typos, improve some language
2 parents 923b768 + 8eb63c8 commit 205c44f

21 files changed

Lines changed: 29 additions & 29 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
131131
use associated constants where appropriate.
132132

133133
* You will now need to invoke `allow_tables_to_appear_in_same_query!` any time two tables
134-
appear together in the same query, even if there is a `joinable!` invocationfor those tables.
134+
appear together in the same query, even if there is a `joinable!` invocation for those tables.
135135

136136
* `diesel_codegen` should no longer explicitly be used as a dependency. Unless
137137
you are using `infer_schema!` or `embed_migrations!`, you can simply remove it
@@ -742,7 +742,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
742742
instead of `env!("foo")` and `"dotenv:foo"` instead of `dotenv!("foo")`. The
743743
use of `dotenv` requires the `dotenv` feature on `diesel_codegen`, which is
744744
included by default. Using `env!` and `dotenv!` will no longer work with
745-
`diesel_codegen`. They continue to work with `diesel_codgen_syntex`, but that
745+
`diesel_codegen`. They continue to work with `diesel_codegen_syntex`, but that
746746
crate will be deprecated when Macros 1.1 is in the beta channel for Rust.
747747

748748
[bash completion]: https://github.com/diesel-rs/diesel/blob/b1a0d9901f0f2a8c8d530ccba8173b57f332b891/diesel_cli/README.md#bash-completion
@@ -1148,7 +1148,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
11481148
* `query_one`, `find`, and `first` now assume a single row is returned. For
11491149
cases where you actually expect 0 or 1 rows to be returned, the `optional`
11501150
method has been added to the result, in case having a `Result<Option<T>>` is
1151-
more ideomatic than checking for `Err(NotFound)`.
1151+
more idiomatic than checking for `Err(NotFound)`.
11521152

11531153
### Deprecated
11541154

diesel/src/macros/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ macro_rules! allow_tables_to_appear_in_same_query {
10861086
}
10871087

10881088
// The order of these modules is important (at least for those which have tests).
1089-
// Utililty macros which don't call any others need to come first.
1089+
// Utility macros which don't call any others need to come first.
10901090
#[macro_use]
10911091
mod internal;
10921092
#[macro_use]

diesel/src/mysql/connection/raw.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ impl Drop for RawConnection {
189189
}
190190
}
191191

192-
/// > In a nonmulti-threaded environment, `mysql_init()` invokes
192+
/// > In a non-multi-threaded environment, `mysql_init()` invokes
193193
/// > `mysql_library_init()` automatically as necessary. However,
194194
/// > `mysql_library_init()` is not thread-safe in a multi-threaded environment,
195195
/// > and thus neither is `mysql_init()`. Before calling `mysql_init()`, either
196196
/// > call `mysql_library_init()` prior to spawning any threads, or use a mutex
197-
/// > ot protect the `mysql_library_init()` call. This should be done prior to
197+
/// > to protect the `mysql_library_init()` call. This should be done prior to
198198
/// > any other client library call.
199199
///
200200
/// <https://dev.mysql.com/doc/refman/5.7/en/mysql-init.html>

diesel/src/pg/connection/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ mod error_codes {
160160
//! These error codes are documented at
161161
//! <https://www.postgresql.org/docs/9.5/static/errcodes-appendix.html>
162162
//!
163-
//! They are not exposed programatically through libpq.
163+
//! They are not exposed programmatically through libpq.
164164
pub const UNIQUE_VIOLATION: &str = "23505";
165165
pub const FOREIGN_KEY_VIOLATION: &str = "23503";
166166
}

diesel/src/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub enum Error {
6969
/// The kind of database error that occurred.
7070
///
7171
/// This is not meant to exhaustively cover all possible errors, but is used to
72-
/// identify errors which are commonly recovered from programatically. This enum
72+
/// identify errors which are commonly recovered from programmatically. This enum
7373
/// is not intended to be exhaustively matched, and new variants may be added in
7474
/// the future without a major version bump.
7575
pub enum DatabaseErrorKind {

diesel/src/types/impls/floats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<DB: Backend<RawValue = [u8]>> FromSql<types::Double, DB> for f64 {
3636
debug_assert!(
3737
bytes.len() <= 8,
3838
"Received more than 8 bytes while decoding \
39-
an f64. Was a numeric accidentally marked as dobule?"
39+
an f64. Was a numeric accidentally marked as double?"
4040
);
4141
bytes
4242
.read_f64::<DB::ByteOrder>()

diesel/src/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ pub trait FromSqlRow<A, DB: Backend + HasSqlType<A>>: Sized {
476476
// - Specialization might also fix this one. The impl isn't quite a strict
477477
// subset (the `FromSql` impl has `T: FromSql`, and the `FromSqlRow` impl
478478
// has `T: FromSqlRow`), but if `FromSql` implies `FromSqlRow`,
479-
// specialization might consdier that a subset?
479+
// specialization might consider that a subset?
480480
// - I don't know that we really need it. `#[derive(FromSqlRow)]` is probably
481481
// good enough. That won't improve our own codebase, since 99% of our
482482
// `FromSqlRow` impls are for types from another crate, but it's almost

diesel_cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ DROP TABLE USERS;
5252
```
5353

5454
You can then run your new migration by running `diesel migration run`. Your
55-
DATABASE_URL must be set in order to run this command, and there are serveral
55+
DATABASE_URL must be set in order to run this command, and there are several
5656
ways that you can set it:
5757

5858
* Set it as an environment variable manually

diesel_cli/src/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ table! {
255255
fn pg_database_exists(conn: &PgConnection, database_name: &str) -> QueryResult<bool> {
256256
use self::pg_database::dsl::*;
257257

258-
pg_database.select(datname) // here come dat name!!!! o shit waddup!!!!
258+
pg_database.select(datname)
259259
.filter(datname.eq(database_name))
260260
.filter(datistemplate.eq(false))
261261
.get_result::<String>(conn)

diesel_cli/tests/migration_generate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Creating migrations.\\d{4}-\\d{2}-\\d{2}-\\d{6}_hello.down.sql\
4343
}
4444

4545
#[test]
46-
fn migration_generate_creates_a_migration_with_initital_contents() {
46+
fn migration_generate_creates_a_migration_with_initial_contents() {
4747
let p = project("migration_name").folder("migrations").build();
4848
let result = p.command("migration").arg("generate").arg("hello").run();
4949
assert!(result.is_success(), "Command failed: {:?}", result);

0 commit comments

Comments
 (0)