Skip to content

Commit 099bd27

Browse files
authored
rustfmt fixes (#637)
1 parent 91fb8c3 commit 099bd27

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

core-text/src/font.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ pub fn new_from_descriptor(desc: &CTFontDescriptor, pt_size: f64) -> CTFont {
180180
}
181181
}
182182

183-
pub fn new_from_descriptor_and_options(desc: &CTFontDescriptor, pt_size: f64, options: CTFontOptions) -> CTFont {
183+
pub fn new_from_descriptor_and_options(
184+
desc: &CTFontDescriptor,
185+
pt_size: f64,
186+
options: CTFontOptions,
187+
) -> CTFont {
184188
unsafe {
185189
let font_ref = CTFontCreateWithFontDescriptorAndOptions(
186190
desc.as_concrete_TypeRef(),
@@ -210,11 +214,19 @@ pub fn new_from_name(name: &str, pt_size: f64) -> Result<CTFont, ()> {
210214
}
211215
}
212216

213-
pub fn new_from_name_and_options(name: &str, pt_size: f64, options: CTFontOptions) -> Result<CTFont, ()> {
217+
pub fn new_from_name_and_options(
218+
name: &str,
219+
pt_size: f64,
220+
options: CTFontOptions,
221+
) -> Result<CTFont, ()> {
214222
unsafe {
215223
let name: CFString = name.parse().unwrap();
216-
let font_ref =
217-
CTFontCreateWithNameAndOptions(name.as_concrete_TypeRef(), pt_size as CGFloat, ptr::null(), options);
224+
let font_ref = CTFontCreateWithNameAndOptions(
225+
name.as_concrete_TypeRef(),
226+
pt_size as CGFloat,
227+
ptr::null(),
228+
options,
229+
);
218230
if font_ref.is_null() {
219231
Err(())
220232
} else {

0 commit comments

Comments
 (0)