cargo fix --edition-idioms

This commit is contained in:
Simon Sapin 2018-11-01 21:43:04 +01:00
parent b1fd6237d1
commit 2012be4a8b
203 changed files with 665 additions and 1281 deletions

View file

@ -6,37 +6,39 @@
use app_units::Au;
use crate::font::{Font, FontTableMethods, FontTableTag, ShapingFlags, ShapingOptions, KERN};
use crate::harfbuzz::hb_blob_t;
use crate::harfbuzz::hb_bool_t;
use crate::harfbuzz::hb_buffer_add_utf8;
use crate::harfbuzz::hb_buffer_destroy;
use crate::harfbuzz::hb_buffer_get_glyph_positions;
use crate::harfbuzz::hb_buffer_get_length;
use crate::harfbuzz::hb_face_destroy;
use crate::harfbuzz::hb_feature_t;
use crate::harfbuzz::hb_font_create;
use crate::harfbuzz::hb_font_funcs_create;
use crate::harfbuzz::hb_font_funcs_set_glyph_h_advance_func;
use crate::harfbuzz::hb_font_funcs_set_glyph_h_kerning_func;
use crate::harfbuzz::hb_font_funcs_set_nominal_glyph_func;
use crate::harfbuzz::hb_font_set_funcs;
use crate::harfbuzz::hb_font_set_ppem;
use crate::harfbuzz::hb_font_set_scale;
use crate::harfbuzz::hb_glyph_info_t;
use crate::harfbuzz::hb_glyph_position_t;
use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
use crate::harfbuzz::{hb_buffer_create, hb_font_destroy};
use crate::harfbuzz::{hb_buffer_get_glyph_infos, hb_shape};
use crate::harfbuzz::{hb_buffer_set_direction, hb_buffer_set_script};
use crate::harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
use crate::harfbuzz::{hb_face_t, hb_font_t};
use crate::harfbuzz::{hb_position_t, hb_tag_t};
use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
use crate::platform::font::FontTable;
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use crate::text::shaping::ShaperMethods;
use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
use euclid::Point2D;
// Eventually we would like the shaper to be pluggable, as many operating systems have their own
// shapers. For now, however, HarfBuzz is a hard dependency.
use harfbuzz_sys::hb_blob_t;
use harfbuzz_sys::hb_bool_t;
use harfbuzz_sys::hb_buffer_add_utf8;
use harfbuzz_sys::hb_buffer_destroy;
use harfbuzz_sys::hb_buffer_get_glyph_positions;
use harfbuzz_sys::hb_buffer_get_length;
use harfbuzz_sys::hb_face_destroy;
use harfbuzz_sys::hb_feature_t;
use harfbuzz_sys::hb_font_create;
use harfbuzz_sys::hb_font_funcs_create;
use harfbuzz_sys::hb_font_funcs_set_glyph_h_advance_func;
use harfbuzz_sys::hb_font_funcs_set_glyph_h_kerning_func;
use harfbuzz_sys::hb_font_funcs_set_nominal_glyph_func;
use harfbuzz_sys::hb_font_set_funcs;
use harfbuzz_sys::hb_font_set_ppem;
use harfbuzz_sys::hb_font_set_scale;
use harfbuzz_sys::hb_glyph_info_t;
use harfbuzz_sys::hb_glyph_position_t;
use harfbuzz_sys::{hb_blob_create, hb_face_create_for_tables};
use harfbuzz_sys::{hb_buffer_create, hb_font_destroy};
use harfbuzz_sys::{hb_buffer_get_glyph_infos, hb_shape};
use harfbuzz_sys::{hb_buffer_set_direction, hb_buffer_set_script};
use harfbuzz_sys::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
use harfbuzz_sys::{hb_face_t, hb_font_t};
use harfbuzz_sys::{hb_position_t, hb_tag_t};
use harfbuzz_sys::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
use std::os::raw::{c_char, c_int, c_uint, c_void};
use std::{char, cmp, ptr};

View file

@ -10,7 +10,7 @@
use crate::font::ShapingOptions;
use crate::text::glyph::GlyphStore;
pub use crate::text::shaping::harfbuzz::Shaper;
pub use self::harfbuzz::Shaper;
pub mod harfbuzz;