Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
fredr committed Oct 30, 2024
1 parent 9a957dd commit 28cf86a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rustflags = [
"-Wclippy::match_wild_err_arm",
"-Wclippy::match_wildcard_for_single_variants",
"-Wclippy::mem_forget",
"-Wclippy::mismatched_target_os",
"-Wunexpected_cfgs",
"-Wclippy::missing_enforced_import_renames",
"-Wclippy::mut_mut",
"-Wclippy::mutex_integer",
Expand Down
2 changes: 1 addition & 1 deletion src/format/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn enhance<S: Style>(
'{' | '}' | ',' => theme.write_highlighted(ch.to_string().as_str(), writer)?,
'"' => state.context = Context::Key,
':' => {
writer.write_all(&[b':'])?;
writer.write_all(b":")?;
state.context = Context::Value;
}
ch => writer.write_all(&[ch as u8])?,
Expand Down
4 changes: 2 additions & 2 deletions src/format/logfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn enhance<S: Style>(
&state.current,
writer.by_ref(),
)?;
writer.write_all(&[b' '])?;
writer.write_all(b" ")?;

// reset state
state.current = String::new();
Expand All @@ -68,7 +68,7 @@ pub fn enhance<S: Style>(
Context::Key => match ch {
'=' => {
theme.write_key(&state.current, writer.by_ref())?;
writer.write_all(&[b'='])?;
writer.write_all(b"=")?;

state.current_key = state.current;

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() -> io::Result<()> {
};

// write a newline as the lines iterator strips that away
stdout.write_all(&[b'\n'])?;
stdout.write_all(b"\n")?;
}

Ok(())
Expand Down

0 comments on commit 28cf86a

Please sign in to comment.