servo: Update Servo Mac specific stuff for language changes
authorPatrick Walton <pcwalton@mimiga.net>
Thu, 30 Aug 2012 18:07:05 -0700
changeset 361867 5c3f9ee2be77f8e6b602b096f1c62976b2fb5c43
parent 361866 0d4ad418c46587c2bb6872da073f0ff2f216e03a
child 361868 0a9d151ceb064143da397cad73c1dbc4e449d49b
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
servo: Update Servo Mac specific stuff for language changes Source-Repo: https://github.com/servo/servo Source-Revision: 381b4f376ca05161de989b6bd6c84c9e0178adde
servo/src/servo/text/native_font/quartz_native_font.rs
--- a/servo/src/servo/text/native_font/quartz_native_font.rs
+++ b/servo/src/servo/text/native_font/quartz_native_font.rs
@@ -1,16 +1,16 @@
 use cocoa;
 
 export QuartzNativeFont, with_test_native_font, create;
 
 import libc::size_t;
 import ptr::null;
 import unsafe::reinterpret_cast;
-import result::{result, ok};
+import result::{Result, Ok};
 import glyph::GlyphIndex;
 import cocoa::cg::{
     CGDataProviderRef,
     CGFontRef
 };
 import cocoa::cg::cg::{
     CGDataProviderCreateWithData,
     CGDataProviderRelease,
@@ -33,43 +33,43 @@ struct QuartzNativeFont/& {
     drop {
         assert self.cgfont.is_not_null();
         assert self.fontprov.is_not_null();
 
         CGFontRelease(self.cgfont);
         CGDataProviderRelease(self.fontprov);
     }
 
-    fn glyph_index(_codepoint: char) -> option<GlyphIndex> {
+    fn glyph_index(_codepoint: char) -> Option<GlyphIndex> {
         // FIXME
-        some(40u)
+        Some(40u)
     }
 
     // FIXME: What unit is this returning? Let's have a custom type
-    fn glyph_h_advance(_glyph: GlyphIndex) -> option<int> {
+    fn glyph_h_advance(_glyph: GlyphIndex) -> Option<int> {
         // FIXME
-        some(15)
+        Some(15)
     }
 }
 
-fn create(buf: &~[u8]) -> result<QuartzNativeFont, ()> {
+fn create(buf: &~[u8]) -> Result<QuartzNativeFont, ()> {
     let fontprov = vec::as_buf(*buf, |cbuf, len| {
         CGDataProviderCreateWithData(
             null(),
             unsafe { reinterpret_cast(cbuf) },
             len as size_t,
             null())
     });
     // FIXME: Error handling
     assert fontprov.is_not_null();
     let cgfont = CGFontCreateWithDataProvider(fontprov);
     // FIXME: Error handling
     assert cgfont.is_not_null();
 
-    return ok(QuartzNativeFont(fontprov, cgfont));
+    return Ok(QuartzNativeFont(fontprov, cgfont));
 }
 
 fn with_test_native_font(f: fn@(nf: &NativeFont)) {
     import font::test_font_bin;
     import unwrap_result = result::unwrap;
 
     let buf = test_font_bin();
     let res = create(&buf);