Skip to content

Instantly share code, notes, and snippets.

View jdm's full-sized avatar

Josh Matthews jdm

View GitHub Profile
diff --git a/src/components/main/layout/layout_task.rs b/src/components/main/layout/layout_task.rs
index 403bdf6..1664c67 100644
--- a/src/components/main/layout/layout_task.rs
+++ b/src/components/main/layout/layout_task.rs
@@ -137,8 +137,11 @@ impl Layout {
/// The high-level routine that performs layout tasks.
fn handle_build(&mut self, data: &BuildData) {
// FIXME: Isolate this transmutation into a "bridge" module.
+ let style_node: &AbstractNode<LayoutView> = unsafe {
+ transmute(&data.style_root)
diff --git a/vendor/src/django-mobility b/vendor/src/django-mobility
[jdm@rosencrantz kitsune]$ git diff
diff --git a/kitsune/questions/models.py b/kitsune/questions/models.py
index c4a6d70..20f0150 100755
--- a/kitsune/questions/models.py
+++ b/kitsune/questions/models.py
@@ -49,6 +49,15 @@ log = logging.getLogger('k.questions')
CACHE_TIMEOUT = 10800 # 3 hours
use std::io;
use std::cast::*;
use std::unstable::intrinsics::*;
struct S{x:int,y:int}
fn foo(sp: &mut S) {
io::println(fmt!("%?", unsafe{
//let sp = &s;
let mut t = uninit();
move_val_init(&mut t,*sp);
from mercurial import ui, hg, cmdutil, match
from collections import defaultdict
import json
import sys
repo = hg.repository(ui.ui(), sys.argv[1])
from_rev = sys.argv[2]
to_rev = sys.argv[3]
employees = {}
# HG changeset patch
# Parent 59beb1868522e2681b8721e29613d0521fe7e6c2
# User Josh Matthews <[email protected]>
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -16,16 +16,17 @@
#include "mozilla/dom/TabChild.h"
#include "mozilla/Preferences.h"
#0 rust_begin_unwind (token=839147) at /home/tiffany/Projects/rust/src/rt/rust_builtin.cpp:532
#1 0x00007ffff77b43d6 in rt::task::Unwinder::begin_unwind::h7c12263797ed078kXao::v0.8$x2dpre ()
from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#2 0x00007ffff77b3963 in sys::begin_unwind_::h89e154cd0915671aI::v0.8$x2dpre () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#3 0x00007ffff77b3492 in sys::__extensions__::fail_with::anon::anon::expr_fn::ad () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#4 0x00007ffff77b33b8 in c_str::ToCStr::with_c_str::hc6798931b183a7aa::v0.8$x2dpre () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#5 0x00007ffff77b3441 in sys::__extensions__::fail_with::anon::expr_fn::ac () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#6 0x00007ffff77b33b8 in c_str::ToCStr::with_c_str::hc6798931b183a7aa::v0.8$x2dpre () from /usr/local/bin/../lib/libstd-6c65cf4b443341b1-0.8-pre.so
#7 0x00007ffff772c1a2 in sys::FailWi
# HG changeset patch
# Parent 59beb1868522e2681b8721e29613d0521fe7e6c2
# User Josh Matthews <[email protected]>
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -16,16 +16,17 @@
#include "mozilla/dom/TabChild.h"
#include "mozilla/Preferences.h"
# HG changeset patch
# Parent 9366ee0396451492b3097fbb499b20fc5c63b82b
# User Josh Matthews <[email protected]>
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2724,16 +2724,17 @@ ContentParent::RecvAddGeolocationListene
}
}
@jdm
jdm / gist:7044664
Last active December 25, 2015 21:48
use std::unstable::raw::Box;
use std::cast;
struct Unreflected<T> {
priv unreflected: T
}
trait EagerReflector {
fn init_reflector(self) -> Self;
}
use node::{DocumentTypeId, Node, NodeBase};
use jsmanaged::JSManaged;
use super::{Reflectable, Reflector};
use eventtarget::{EventTarget, EventTargetBase, NodeTargetTypeId};
pub trait DocumentDerived { fn is_document(&self) -> bool; }
pub trait DocumentBase : NodeBase {}
impl EventTargetBase for Document {}
impl NodeBase for Document {}