mirror of https://github.com/smithy-lang/smithy-rs
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:
parent
0bef36c603
commit
d4bf8e6e2a
|
@ -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
|
||||
|
||||
|
|
|
@ -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$
|
||||
|
|
|
@ -44,7 +44,7 @@ struct Opt {
|
|||
#[structopt(short, long)]
|
||||
region: Option<String>,
|
||||
|
||||
/// Activate verbose mode
|
||||
/// Activate verbose mode
|
||||
#[structopt(short, long)]
|
||||
verbose: bool,
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ struct Opt {
|
|||
#[structopt(short, long)]
|
||||
key: String,
|
||||
|
||||
/// Activate verbose mode
|
||||
/// Activate verbose mode
|
||||
#[structopt(short, long)]
|
||||
verbose: bool,
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ struct Opt {
|
|||
#[structopt(short, long)]
|
||||
table: String,
|
||||
|
||||
/// Activate verbose mode
|
||||
/// Activate verbose mode
|
||||
#[structopt(short, long)]
|
||||
verbose: bool,
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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" }
|
||||
|
|
Loading…
Reference in New Issue