Skip to content

Commit

Permalink
Add the #[must_use] attribute to the Input trait
Browse files Browse the repository at this point in the history
  • Loading branch information
magicant committed Aug 27, 2024
1 parent 2e6f374 commit 112163d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions yash-syntax/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to `yash-syntax` will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.1] - Unreleased

### Changed

- The `input::Input` trait is now `#[must_use]`.

## [0.11.0] - 2024-08-22

### Added
Expand Down Expand Up @@ -315,6 +321,7 @@ command.
- Functionalities to parse POSIX shell scripts
- Alias substitution support

[0.11.1]: https://github.com/magicant/yash-rs/releases/tag/yash-syntax-0.11.1
[0.11.0]: https://github.com/magicant/yash-rs/releases/tag/yash-syntax-0.11.0
[0.10.0]: https://github.com/magicant/yash-rs/releases/tag/yash-syntax-0.10.0
[0.9.0]: https://github.com/magicant/yash-rs/releases/tag/yash-syntax-0.9.0
Expand Down
1 change: 1 addition & 0 deletions yash-syntax/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub type Result = std::result::Result<String, Error>;
///
/// An `Input` object provides the parser with source code by reading from underlying source.
#[async_trait(?Send)]
#[must_use = "Input instances should be used by a parser"]
pub trait Input {
/// Reads a next line of the source code.
///
Expand Down

0 comments on commit 112163d

Please sign in to comment.