Skip to content

Commit ac1e6c8

Browse files
committed
cargo fmt
1 parent 1d46a42 commit ac1e6c8

File tree

5 files changed

+18
-50
lines changed

5 files changed

+18
-50
lines changed

src/expr.rs

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,7 @@ impl Expr {
483483
/// use sea_query::{tests_cfg::*, *};
484484
///
485485
/// let query = Query::select()
486-
/// .expr(Expr::cust_with_values(
487-
/// "data @? ($1::JSONPATH)",
488-
/// ["hello"],
489-
/// ))
486+
/// .expr(Expr::cust_with_values("data @? ($1::JSONPATH)", ["hello"]))
490487
/// .to_owned();
491488
///
492489
/// assert_eq!(
@@ -1912,19 +1909,14 @@ impl Expr {
19121909
/// # Examples
19131910
///
19141911
/// ```
1915-
/// use sea_query::{*, tests_cfg::*};
1912+
/// use sea_query::{tests_cfg::*, *};
19161913
///
19171914
/// let query = Query::select()
19181915
/// .column(Char::Id)
19191916
/// .from(Char::Table)
1920-
/// .and_where(
1921-
/// Expr::col(Char::Id)
1922-
/// .eq(
1923-
/// Expr::any(
1924-
/// Query::select().column(Char::Id).from(Char::Table).take()
1925-
/// )
1926-
/// )
1927-
/// )
1917+
/// .and_where(Expr::col(Char::Id).eq(Expr::any(
1918+
/// Query::select().column(Char::Id).from(Char::Table).take(),
1919+
/// )))
19281920
/// .to_owned();
19291921
///
19301922
/// assert_eq!(
@@ -1948,19 +1940,14 @@ impl Expr {
19481940
/// # Examples
19491941
///
19501942
/// ```
1951-
/// use sea_query::{*, tests_cfg::*};
1943+
/// use sea_query::{tests_cfg::*, *};
19521944
///
19531945
/// let query = Query::select()
19541946
/// .column(Char::Id)
19551947
/// .from(Char::Table)
1956-
/// .and_where(
1957-
/// Expr::col(Char::Id)
1958-
/// .ne(
1959-
/// Expr::some(
1960-
/// Query::select().column(Char::Id).from(Char::Table).take()
1961-
/// )
1962-
/// )
1963-
/// )
1948+
/// .and_where(Expr::col(Char::Id).ne(Expr::some(
1949+
/// Query::select().column(Char::Id).from(Char::Table).take(),
1950+
/// )))
19641951
/// .to_owned();
19651952
///
19661953
/// assert_eq!(
@@ -2238,14 +2225,11 @@ impl Expr {
22382225
/// # Examples
22392226
///
22402227
/// ```
2241-
/// use sea_query::{Query, Expr, PostgresQueryBuilder, MysqlQueryBuilder, SqliteQueryBuilder};
2228+
/// use sea_query::{Expr, MysqlQueryBuilder, PostgresQueryBuilder, Query, SqliteQueryBuilder};
22422229
///
22432230
/// let query = Query::select().expr(Expr::current_date()).to_owned();
22442231
///
2245-
/// assert_eq!(
2246-
/// query.to_string(MysqlQueryBuilder),
2247-
/// r#"SELECT CURRENT_DATE"#
2248-
/// );
2232+
/// assert_eq!(query.to_string(MysqlQueryBuilder), r#"SELECT CURRENT_DATE"#);
22492233
/// assert_eq!(
22502234
/// query.to_string(PostgresQueryBuilder),
22512235
/// r#"SELECT CURRENT_DATE"#
@@ -2264,14 +2248,11 @@ impl Expr {
22642248
/// # Examples
22652249
///
22662250
/// ```
2267-
/// use sea_query::{Query, Expr, PostgresQueryBuilder, MysqlQueryBuilder, SqliteQueryBuilder};
2251+
/// use sea_query::{Expr, MysqlQueryBuilder, PostgresQueryBuilder, Query, SqliteQueryBuilder};
22682252
///
22692253
/// let query = Query::select().expr(Expr::current_time()).to_owned();
22702254
///
2271-
/// assert_eq!(
2272-
/// query.to_string(MysqlQueryBuilder),
2273-
/// r#"SELECT CURRENT_TIME"#
2274-
/// );
2255+
/// assert_eq!(query.to_string(MysqlQueryBuilder), r#"SELECT CURRENT_TIME"#);
22752256
/// assert_eq!(
22762257
/// query.to_string(PostgresQueryBuilder),
22772258
/// r#"SELECT CURRENT_TIME"#
@@ -2290,7 +2271,7 @@ impl Expr {
22902271
/// # Examples
22912272
///
22922273
/// ```
2293-
/// use sea_query::{Query, Expr, PostgresQueryBuilder, MysqlQueryBuilder, SqliteQueryBuilder};
2274+
/// use sea_query::{Expr, MysqlQueryBuilder, PostgresQueryBuilder, Query, SqliteQueryBuilder};
22942275
///
22952276
/// let query = Query::select().expr(Expr::current_timestamp()).to_owned();
22962277
///

src/extension/postgres/types.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,7 @@ impl TypeCreateStatement {
184184
/// assert_eq!(
185185
/// Type::create()
186186
/// .as_enum(FontFamily::Type)
187-
/// .values([
188-
/// FontFamily::Serif,
189-
/// FontFamily::Sans,
190-
/// FontFamily::Monospace
191-
/// ])
187+
/// .values([FontFamily::Serif, FontFamily::Sans, FontFamily::Monospace])
192188
/// .to_string(PostgresQueryBuilder),
193189
/// r#"CREATE TYPE "font_family" AS ENUM ('serif', 'sans', 'monospace')"#
194190
/// );

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,7 @@
401401
//! # use sea_query::{*, tests_cfg::*};
402402
//! let query = Query::update()
403403
//! .table(Glyph::Table)
404-
//! .values([
405-
//! (Glyph::Aspect, 1.23.into()),
406-
//! (Glyph::Image, "123".into()),
407-
//! ])
404+
//! .values([(Glyph::Aspect, 1.23.into()), (Glyph::Image, "123".into())])
408405
//! .and_where(Expr::col(Glyph::Id).eq(1))
409406
//! .to_owned();
410407
//!

src/query/select.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,10 +1632,7 @@ impl SelectStatement {
16321632
/// let query = Query::select()
16331633
/// .from(Char::Table)
16341634
/// .column(Char::Character)
1635-
/// .add_group_by([
1636-
/// Expr::col(Char::SizeW).into(),
1637-
/// Expr::col(Char::SizeH).into(),
1638-
/// ])
1635+
/// .add_group_by([Expr::col(Char::SizeW).into(), Expr::col(Char::SizeH).into()])
16391636
/// .to_owned();
16401637
///
16411638
/// assert_eq!(

src/query/update.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ use crate::{
1818
///
1919
/// let query = Query::update()
2020
/// .table(Glyph::Table)
21-
/// .values([
22-
/// (Glyph::Aspect, 1.23.into()),
23-
/// (Glyph::Image, "123".into()),
24-
/// ])
21+
/// .values([(Glyph::Aspect, 1.23.into()), (Glyph::Image, "123".into())])
2522
/// .and_where(Expr::col(Glyph::Id).eq(1))
2623
/// .to_owned();
2724
///

0 commit comments

Comments
 (0)