Update rustfmt hook to run on all files (#348)

* Update rustfmt hook to run on all files

* Add missing --check
This commit is contained in:
Russell Cohen 2021-04-30 17:33:20 -04:00 committed by GitHub
parent 0bef36c603
commit d4bf8e6e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 24 additions and 15 deletions

View File

@ -112,6 +112,8 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.rust_version }}
- name: Format Check
run: rustfmt --check --edition 2018 $(find -name '*.rs' -print)
- name: execute runtime tests
run: ./rust-runtime/test.sh

View File

@ -12,3 +12,6 @@ repos:
args: [--autofix, --ktlint-version, 0.40.0]
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
- id: pretty-format-rust
entry: rustfmt --edition 2018
files: ^.*\.rs$

View File

@ -44,7 +44,7 @@ struct Opt {
#[structopt(short, long)]
region: Option<String>,
/// Activate verbose mode
/// Activate verbose mode
#[structopt(short, long)]
verbose: bool,
}

View File

@ -30,7 +30,7 @@ struct Opt {
#[structopt(short, long)]
key: String,
/// Activate verbose mode
/// Activate verbose mode
#[structopt(short, long)]
verbose: bool,
}

View File

@ -23,7 +23,7 @@ struct Opt {
#[structopt(short, long)]
table: String,
/// Activate verbose mode
/// Activate verbose mode
#[structopt(short, long)]
verbose: bool,
}

View File

@ -17,14 +17,18 @@ async fn main() -> Result<(), dynamodb::Error> {
let new_table = client
.create_table()
.table_name("test-table")
.key_schema(KeySchemaElement::builder()
.attribute_name("k")
.key_type(KeyType::Hash)
.build())
.attribute_definitions(AttributeDefinition::builder()
.attribute_name("k")
.attribute_type(ScalarAttributeType::S)
.build())
.key_schema(
KeySchemaElement::builder()
.attribute_name("k")
.key_type(KeyType::Hash)
.build(),
)
.attribute_definitions(
AttributeDefinition::builder()
.attribute_name("k")
.attribute_type(ScalarAttributeType::S)
.build(),
)
.provisioned_throughput(
ProvisionedThroughput::builder()
.write_capacity_units(10)

View File

@ -1,4 +1,4 @@
# QldbSession Hello World Example
This repo has a simple hello-world example for QldbSession that will start a session.
This repo has a simple hello-world example for QldbSession that will start a session.
The QldbSession API is not intended for raw usage. Rather, a higher-level "driver" such as the Amazon QLDB Driver for Rust should be used.

View File

@ -10,4 +10,4 @@ secretsmanager = { package = "aws-sdk-secretsmanager", path = "../../build/aws-s
tokio = { version = "1", features = ["full"]}
structopt = { version = "0.3", default-features = false }
tracing-subscriber = { version = "0.2.16", features = ["fmt"] }
aws-types = { path = "../../build/aws-sdk/aws-types" }
aws-types = { path = "../../build/aws-sdk/aws-types" }

View File

@ -10,4 +10,4 @@ secretsmanager = { package = "aws-sdk-secretsmanager", path = "../../build/aws-s
tokio = { version = "1", features = ["full"]}
structopt = { version = "0.3", default-features = false }
tracing-subscriber = { version = "0.2.16", features = ["fmt"] }
aws-types = { path = "../../build/aws-sdk/aws-types" }
aws-types = { path = "../../build/aws-sdk/aws-types" }

View File

@ -10,4 +10,4 @@ secretsmanager = { package = "aws-sdk-secretsmanager", path = "../../build/aws-s
tokio = { version = "1", features = ["full"]}
structopt = { version = "0.3", default-features = false }
tracing-subscriber = { version = "0.2.16", features = ["fmt"] }
aws-types = { path = "../../build/aws-sdk/aws-types" }
aws-types = { path = "../../build/aws-sdk/aws-types" }