Closed Bug 1366421 Opened 7 years ago Closed 7 years ago

stylo: Use assign_utf8() instead of write! macro

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1358966

People

(Reporter: hiro, Unassigned)

References

(Blocks 1 open bug)

Details

From emilio's review comment [1]

+        write!(unsafe { &mut *buffer }, "{}", string).expect("Failed to copy string");

Why can't this be just buffer.assign_utf8(string)? That'd be more efficient.


[1] https://github.com/servo/servo/pull/16959#pullrequestreview-39319325
Blocks: stylo-perf
Priority: -- → P4
Hiro, is this bug still relevant? I no longer see the "Failed to copy string" code from comment 0 in mozilla-central.
Flags: needinfo?(hikezoe)
Oh right, I did already fix this in bug 1358966.  Thanks!
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(hikezoe)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.