Skip to content

fix clippy error - #95

Merged
oli-obk merged 1 commit into
davidbarsky:mainfrom
seyyed-dev:fix-clippy-errors
Jul 20, 2026
Merged

fix clippy error#95
oli-obk merged 1 commit into
davidbarsky:mainfrom
seyyed-dev:fix-clippy-errors

Conversation

@seyyed-dev

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/format.rs
Comment on lines 225 to +228
match style {
SpanMode::Close { .. } | SpanMode::PostClose => {
if indent > 0 && (indent + 1) % config.wraparound == 0 {
self.indent_buf.push_str(&prefix);
for _ in 0..(indent % config.wraparound * config.indent_amount) {
self.indent_buf.push_str(LINE_HORIZ);
}
self.indent_buf.push_str(LINE_OPEN);
self.indent_buf.push('\n');
SpanMode::Close { .. } | SpanMode::PostClose
if indent > 0 && (indent + 1) % config.wraparound == 0 =>
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could even make it a let chain now, removing another level of indentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way?

            if let SpanMode::Close { .. } | SpanMode::PostClose = style {
                if indent > 0 && (indent + 1) % config.wraparound == 0 {
// ... body ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok it is merged!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, progress is good, didn't want to block your PR

Comment thread tests/ui.rs
OutputConflictHandling::Error
};

let config = Config {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh we'll probably want to bump the version, too

@oli-obk
oli-obk merged commit 4ad45fc into davidbarsky:main Jul 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants