Skip to content

Commit

Permalink
style: satisfy clippy & fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd committed May 30, 2024
1 parent 75765be commit ef1838b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->

## [Unreleased] - ReleaseDate
### Added
- Show `__awaitee` type name ([#2]).

### Fixed
- Support nightly after 2024-03-22 ([#4]).

[#2]: https://github.com/loyd/top-type-sizes/issues/2
[#4]: https://github.com/loyd/top-type-sizes/pull/4

## [0.1.5] - 2023-03-16
### Added
Expand Down
4 changes: 2 additions & 2 deletions src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ pub fn read(mut rd: impl BufRead) -> eyre::Result<String> {
while rd.read_line(&mut line)? > 0 {
let Some(refined_line) = line.strip_prefix("print-type-size ") else {
line.clear();
continue
continue;
};

result.push_str(refined_line);
line.clear();
}

// Handle a trailing newline.
if result.chars().rev().next().map_or(false, |c| c == '\n') {
if result.chars().next_back().map_or(false, |c| c == '\n') {
result.pop();
}

Expand Down

0 comments on commit ef1838b

Please sign in to comment.