Skip to content

Commit

Permalink
Update to Rust edition 2021
Browse files Browse the repository at this point in the history
Bump the edition (only 3 years late...) and do some other miscellaneous cleanup.
  • Loading branch information
sagebind committed Apr 2, 2024
1 parent d48d2ed commit 6489a81
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yaml,yml}]
indent_size = 2
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ jobs:
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
- uses: actions/checkout@v4

- run: cargo test --workspace
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [email protected]
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT"
repository = "https://github.com/sagebind/stability"
documentation = "https://docs.rs/stability/"
readme = "README.md"
edition = "2018"
edition = "2021"

[dependencies]
quote = "1"
Expand Down
2 changes: 1 addition & 1 deletion example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stability-example"
version = "0.0.0"
description = "Example crate demonstrating stablity usage."
authors = ["Stephen M. Coakley <[email protected]>"]
edition = "2018"
edition = "2021"
publish = false

[features]
Expand Down
24 changes: 12 additions & 12 deletions src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ impl UnstableAttribute {
if let Some(issue) = &self.issue {
let doc_addendum = format!(
"\n\
# Availability\n\
\n\
**This API is marked as unstable** and is only available when \
the `{}` crate feature is enabled. This comes with no stability \
guarantees, and could be changed or removed at any time.
# Availability\n\
\n\
**This API is marked as unstable** and is only available when \
the `{}` crate feature is enabled. This comes with no stability \
guarantees, and could be changed or removed at any time.
The tracking issue is: `{}`
",
",
feature_name, issue
);
item.push_attr(parse_quote! {
Expand All @@ -58,12 +58,12 @@ The tracking issue is: `{}`
} else {
let doc_addendum = format!(
"\n\
# Availability\n\
\n\
**This API is marked as unstable** and is only available when \
the `{}` crate feature is enabled. This comes with no stability \
guarantees, and could be changed or removed at any time.\
",
# Availability\n\
\n\
**This API is marked as unstable** and is only available when \
the `{}` crate feature is enabled. This comes with no stability \
guarantees, and could be changed or removed at any time.\
",
feature_name
);
item.push_attr(parse_quote! {
Expand Down

0 comments on commit 6489a81

Please sign in to comment.