@@ -387,7 +387,7 @@ impl CTFont {
387
387
advances : * mut CGSize ,
388
388
count : CFIndex ,
389
389
) -> f64 {
390
- CTFontGetAdvancesForGlyphs ( self . 0 , orientation, glyphs, advances, count) as f64
390
+ CTFontGetAdvancesForGlyphs ( self . 0 , orientation, glyphs, advances, count)
391
391
}
392
392
393
393
pub unsafe fn get_vertical_translations_for_glyphs (
@@ -980,8 +980,8 @@ fn equal_descriptor_different_font() {
980
980
981
981
// but we can still construct the CGFont by name
982
982
let create_vars = |desc| {
983
- let mut vals: Vec < ( CFNumber , CFNumber ) > = Vec :: new ( ) ;
984
- vals . push ( ( CFNumber :: from ( 0x6f70737a ) , CFNumber :: from ( 17. ) ) ) ;
983
+ let vals: Vec < ( CFNumber , CFNumber ) > =
984
+ vec ! [ ( CFNumber :: from( 0x6f70737a ) , CFNumber :: from( 17. ) ) ] ;
985
985
let vals_dict = CFDictionary :: from_CFType_pairs ( & vals) ;
986
986
let attrs_dict =
987
987
CFDictionary :: from_CFType_pairs ( & [ ( variation_attribute. clone ( ) , vals_dict) ] ) ;
@@ -1081,8 +1081,8 @@ fn system_font_variation() {
1081
1081
let cgfont = new_from_CGFont ( & cgfont, 0. ) ;
1082
1082
let desc = cgfont. copy_descriptor ( ) ;
1083
1083
1084
- let mut vals: Vec < ( CFNumber , CFNumber ) > = Vec :: new ( ) ;
1085
- vals . push ( ( CFNumber :: from ( 0x6f70737a /* opsz */ ) , CFNumber :: from ( 17. ) ) ) ;
1084
+ let vals: Vec < ( CFNumber , CFNumber ) > =
1085
+ vec ! [ ( CFNumber :: from( 0x6f70737a /* opsz */ ) , CFNumber :: from( 17. ) ) ] ;
1086
1086
let vals_dict = CFDictionary :: from_CFType_pairs ( & vals) ;
1087
1087
let variation_attribute =
1088
1088
unsafe { CFString :: wrap_under_get_rule ( font_descriptor:: kCTFontVariationAttribute) } ;
0 commit comments