Skip to content

Commit 2c1d0d6

Browse files
Apply nightly rustfmt formatting to doc comment code examples
1 parent 39e87f7 commit 2c1d0d6

File tree

27 files changed

+33
-43
lines changed

27 files changed

+33
-43
lines changed

datafusion-examples/examples/data_io/remote_catalog.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// under the License.
1717

1818
//! See `main.rs` for how to run it.
19-
//!
2019
/// This example shows how to implement the DataFusion [`CatalogProvider`] API
2120
/// for catalogs that are remote (require network access) and/or offer only
2221
/// asynchronous APIs such as [Polaris], [Unity], and [Hive].

datafusion-examples/examples/udf/simple_udaf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// under the License.
1717

1818
//! See `main.rs` for how to run it.
19-
//!
2019
/// In this example we will declare a single-type, single return type UDAF that computes the geometric mean.
2120
/// The geometric mean is described here: https://en.wikipedia.org/wiki/Geometric_mean
2221
use datafusion::arrow::{

datafusion/common/src/scalar/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,8 +2790,8 @@ impl ScalarValue {
27902790
/// ```
27912791
/// use arrow::array::{Int32Array, ListArray};
27922792
/// use arrow::datatypes::{DataType, Int32Type};
2793-
/// use datafusion_common::cast::as_list_array;
27942793
/// use datafusion_common::ScalarValue;
2794+
/// use datafusion_common::cast::as_list_array;
27952795
///
27962796
/// let scalars = vec![
27972797
/// ScalarValue::Int32(Some(1)),
@@ -2851,8 +2851,8 @@ impl ScalarValue {
28512851
/// ```
28522852
/// use arrow::array::{Int32Array, ListArray};
28532853
/// use arrow::datatypes::{DataType, Int32Type};
2854-
/// use datafusion_common::cast::as_list_array;
28552854
/// use datafusion_common::ScalarValue;
2855+
/// use datafusion_common::cast::as_list_array;
28562856
///
28572857
/// let scalars = vec![
28582858
/// ScalarValue::Int32(Some(1)),
@@ -2895,8 +2895,8 @@ impl ScalarValue {
28952895
/// ```
28962896
/// use arrow::array::{Int32Array, LargeListArray};
28972897
/// use arrow::datatypes::{DataType, Int32Type};
2898-
/// use datafusion_common::cast::as_large_list_array;
28992898
/// use datafusion_common::ScalarValue;
2899+
/// use datafusion_common::cast::as_large_list_array;
29002900
///
29012901
/// let scalars = vec![
29022902
/// ScalarValue::Int32(Some(1)),
@@ -3345,8 +3345,8 @@ impl ScalarValue {
33453345
/// ```
33463346
/// use arrow::array::ListArray;
33473347
/// use arrow::datatypes::{DataType, Int32Type};
3348-
/// use datafusion_common::utils::SingleRowListArrayBuilder;
33493348
/// use datafusion_common::ScalarValue;
3349+
/// use datafusion_common::utils::SingleRowListArrayBuilder;
33503350
/// use std::sync::Arc;
33513351
///
33523352
/// let list_arr = ListArray::from_iter_primitive::<Int32Type, _, _>(vec![

datafusion/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@
488488
//! consumes it immediately as well.
489489
//!
490490
//! ```text
491-
//!
491+
//!
492492
//! Step 3: FilterExec calls next() Step 2: ProjectionExec calls
493493
//! on input Stream next() on input Stream
494494
//! ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐

datafusion/doc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ impl Default for DocSection {
195195
/// Example:
196196
///
197197
/// ```rust
198-
///
198+
///
199199
/// # fn main() {
200200
/// use datafusion_doc::{DocSection, Documentation};
201201
/// let doc_section = DocSection {

datafusion/expr-common/src/interval_arithmetic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ fn min_of_bounds(first: &ScalarValue, second: &ScalarValue) -> ScalarValue {
13171317
/// Example usage:
13181318
/// ```
13191319
/// use datafusion_common::DataFusionError;
1320-
/// use datafusion_expr_common::interval_arithmetic::{satisfy_greater, Interval};
1320+
/// use datafusion_expr_common::interval_arithmetic::{Interval, satisfy_greater};
13211321
///
13221322
/// let left = Interval::make(Some(-1000.0_f32), Some(1000.0_f32))?;
13231323
/// let right = Interval::make(Some(500.0_f32), Some(2000.0_f32))?;

datafusion/expr-common/src/signature.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ fn get_data_types(native_type: &NativeType) -> Vec<DataType> {
899899
/// # Examples
900900
///
901901
/// ```
902-
/// use datafusion_common::types::{logical_binary, logical_string, NativeType};
902+
/// use datafusion_common::types::{NativeType, logical_binary, logical_string};
903903
/// use datafusion_expr_common::signature::{Coercion, TypeSignatureClass};
904904
///
905905
/// // Exact coercion that only accepts timestamp types

datafusion/expr/src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ impl Expr {
18511851
/// Example
18521852
/// ```
18531853
/// # use datafusion_common::Column;
1854-
/// use datafusion_expr::{col, Expr};
1854+
/// use datafusion_expr::{Expr, col};
18551855
/// let expr = col("foo");
18561856
/// assert_eq!(expr.try_as_col(), Some(&Column::from("foo")));
18571857
///

datafusion/expr/src/logical_plan/ddl.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ impl CreateExternalTable {
255255
/// TableReference::bare("my_table"),
256256
/// "/path/to/data",
257257
/// "parquet",
258-
/// Arc::new(DFSchema::empty())
259-
/// ).build();
258+
/// Arc::new(DFSchema::empty()),
259+
/// )
260+
/// .build();
260261
/// ```
261262
pub fn builder(
262263
name: impl Into<TableReference>,

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ impl LogicalPlan {
15871587
///
15881588
/// ```
15891589
/// use arrow::datatypes::{DataType, Field, Schema};
1590-
/// use datafusion_expr::{col, lit, logical_plan::table_scan, LogicalPlanBuilder};
1590+
/// use datafusion_expr::{LogicalPlanBuilder, col, lit, logical_plan::table_scan};
15911591
/// let schema = Schema::new(vec![Field::new("id", DataType::Int32, false)]);
15921592
/// let plan = table_scan(Some("t1"), &schema, None)
15931593
/// .unwrap()
@@ -1629,7 +1629,7 @@ impl LogicalPlan {
16291629
///
16301630
/// ```
16311631
/// use arrow::datatypes::{DataType, Field, Schema};
1632-
/// use datafusion_expr::{col, lit, logical_plan::table_scan, LogicalPlanBuilder};
1632+
/// use datafusion_expr::{LogicalPlanBuilder, col, lit, logical_plan::table_scan};
16331633
/// let schema = Schema::new(vec![Field::new("id", DataType::Int32, false)]);
16341634
/// let plan = table_scan(Some("t1"), &schema, None)
16351635
/// .unwrap()
@@ -1694,7 +1694,7 @@ impl LogicalPlan {
16941694
///
16951695
/// ```
16961696
/// use arrow::datatypes::{DataType, Field, Schema};
1697-
/// use datafusion_expr::{col, lit, logical_plan::table_scan, LogicalPlanBuilder};
1697+
/// use datafusion_expr::{LogicalPlanBuilder, col, lit, logical_plan::table_scan};
16981698
/// let schema = Schema::new(vec![Field::new("id", DataType::Int32, false)]);
16991699
/// let plan = table_scan(Some("t1"), &schema, None)
17001700
/// .unwrap()
@@ -1752,7 +1752,7 @@ impl LogicalPlan {
17521752
/// ```
17531753
/// ```
17541754
/// use arrow::datatypes::{DataType, Field, Schema};
1755-
/// use datafusion_expr::{col, lit, logical_plan::table_scan, LogicalPlanBuilder};
1755+
/// use datafusion_expr::{LogicalPlanBuilder, col, lit, logical_plan::table_scan};
17561756
/// let schema = Schema::new(vec![Field::new("id", DataType::Int32, false)]);
17571757
/// let plan = table_scan(Some("t1"), &schema, None)
17581758
/// .unwrap()

0 commit comments

Comments
 (0)