Skip to content

Commit 6240c95

Browse files
committed
chore: fix Rust 1.84.0 lints and errors (#3202)
There was only a single case of the new `needless_as_bytes` lint which was triggered and needed to be fixed. There was also a "UI" test in `tracing-attributes` that needed to be updated because the error text has changed (it gives more details of course).
1 parent 44b9493 commit 6240c95

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tracing-attributes/tests/ui/async_instrument.stderr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ error[E0277]: `(&str,)` doesn't implement `std::fmt::Display`
2828
--> tests/ui/async_instrument.rs:14:1
2929
|
3030
14 | #[tracing::instrument]
31-
| ^^^^^^^^^^^^^^^^^^^^^^ `(&str,)` cannot be formatted with the default formatter
31+
| ^^^^^^^^^^^^^^^^^^^^^^
32+
| |
33+
| `(&str,)` cannot be formatted with the default formatter
34+
| return type was inferred to be `(&str,)` here
3235
|
3336
= help: the trait `std::fmt::Display` is not implemented for `(&str,)`
3437
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

tracing-subscriber/src/fmt/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ impl io::Write for WriteAdaptor<'_> {
11861186
.write_str(s)
11871187
.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
11881188

1189-
Ok(s.as_bytes().len())
1189+
Ok(s.len())
11901190
}
11911191

11921192
fn flush(&mut self) -> io::Result<()> {

0 commit comments

Comments
 (0)