Skip to content

Commit 1d4740e

Browse files
ErichDonGublercwfitzgerald
authored andcommitted
build: upgrade ron 0.8.1 → 0.9.0
1 parent b3da513 commit 1d4740e

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

Cargo.lock

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ profiling = { version = "1", default-features = false }
142142
raw-window-handle = { version = "0.6", default-features = false }
143143
rayon = "1"
144144
renderdoc-sys = "1.1.0"
145-
ron = "0.8"
145+
ron = "0.9"
146146
# NOTE: rustc-hash v2 is a completely different hasher with different performance characteristics
147147
# see discussion here (including with some other alternatives): https://github.com/gfx-rs/wgpu/issues/6999
148148
# (using default-features = false to support no-std build, avoiding any extra features that may require std::collections)

wgpu-core/src/lock/observing.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use std::{
3636
fs::File,
3737
panic::Location,
3838
path::{Path, PathBuf},
39-
vec::Vec,
39+
string::String,
4040
};
4141

4242
use super::rank::{LockRank, LockRankSet};
@@ -341,7 +341,7 @@ struct ObservationLog {
341341
locations_seen: FastHashSet<*const Location<'static>>,
342342

343343
/// Buffer for serializing events, retained for allocation reuse.
344-
buffer: Vec<u8>,
344+
buffer: String,
345345
}
346346

347347
#[allow(trivial_casts)]
@@ -358,7 +358,7 @@ impl ObservationLog {
358358
Ok(ObservationLog {
359359
log_file,
360360
locations_seen: FastHashSet::default(),
361-
buffer: Vec::new(),
361+
buffer: String::new(),
362362
})
363363
}
364364

@@ -408,9 +408,9 @@ impl ObservationLog {
408408
self.buffer.clear();
409409
ron::ser::to_writer(&mut self.buffer, &action)
410410
.expect("error serializing `lock::observing::Action`");
411-
self.buffer.push(b'\n');
411+
self.buffer.push('\n');
412412
self.log_file
413-
.write_all(&self.buffer)
413+
.write_all(self.buffer.as_bytes())
414414
.expect("error writing `lock::observing::Action`");
415415
}
416416
}

0 commit comments

Comments
 (0)