Skip to content

Commit

Permalink
Update to Rust edition 2021 (#9)
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 3b2a340
Show file tree
Hide file tree
Showing 7 changed files with 27 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]
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ license = "MIT"
repository = "https://github.com/sagebind/stability"
documentation = "https://docs.rs/stability/"
readme = "README.md"
edition = "2018"
edition = "2021"
rust-version = "1.60"

[dependencies]
quote = "1"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Rust API stability attributes for the rest of us.
[![Crates.io](https://img.shields.io/crates/v/stability.svg)](https://crates.io/crates/stability)
[![Documentation](https://docs.rs/stability/badge.svg)][documentation]
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
![Minimum supported Rust version](https://img.shields.io/badge/rustc-1.60+-yellow.svg)
[![Build](https://github.com/sagebind/stability/workflows/ci/badge.svg)](https://github.com/sagebind/stability/actions)

## Overview
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 3b2a340

Please sign in to comment.