mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove some more unnecessary let bindings
This commit is contained in:
parent
2947d78e4e
commit
bc1eb97671
11 changed files with 29 additions and 84 deletions
|
@ -65,10 +65,8 @@ impl ErrorEvent {
|
|||
colno: u32,
|
||||
error: HandleValue) -> Root<ErrorEvent> {
|
||||
let ev = ErrorEvent::new_uninitialized(global);
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
{
|
||||
let ev = ev.r();
|
||||
let event = EventCast::from_ref(ev);
|
||||
let event = EventCast::from_ref(ev.r());
|
||||
event.InitEvent(type_, bubbles == EventBubbles::Bubbles,
|
||||
cancelable == EventCancelable::Cancelable);
|
||||
*ev.message.borrow_mut() = message;
|
||||
|
@ -125,15 +123,11 @@ impl<'a> ErrorEventMethods for &'a ErrorEvent {
|
|||
}
|
||||
|
||||
fn Message(self) -> DOMString {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let message = self.message.borrow();
|
||||
message.clone()
|
||||
self.message.borrow().clone()
|
||||
}
|
||||
|
||||
fn Filename(self) -> DOMString {
|
||||
// FIXME(https://github.com/rust-lang/rust/issues/23338)
|
||||
let filename = self.filename.borrow();
|
||||
filename.clone()
|
||||
self.filename.borrow().clone()
|
||||
}
|
||||
|
||||
fn Error(self, _cx: *mut JSContext) -> JSVal {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue