mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix infinite recursion in Au formatting
Polymorphism strikes again. This should have been **obj but let's switch to an explicit pattern match to be safe. Fixes #1172.
This commit is contained in:
parent
352acbb833
commit
35d863cc89
1 changed files with 2 additions and 1 deletions
|
@ -21,7 +21,8 @@ impl Clone for Au {
|
|||
|
||||
impl fmt::Default for Au {
|
||||
fn fmt(obj: &Au, f: &mut fmt::Formatter) {
|
||||
write!(f.buf, "Au({})", *obj);
|
||||
let Au(n) = *obj;
|
||||
write!(f.buf, "Au({})", n);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue