@@ -17,6 +17,15 @@ use std::{ptr, slice};
1717
1818mod sys;
1919
20+ /// Import things from our bridge crates to ensure that we actually link with
21+ /// them.
22+ mod linkage {
23+ #[ allow( unused_imports) ]
24+ use tectonic_bridge_flate as clippyrenamehack1;
25+ #[ allow( unused_imports) ]
26+ use tectonic_bridge_png as clippyrenamehack2;
27+ }
28+
2029pub use sys:: FT_BBox as BBox ;
2130pub use sys:: FT_Fixed as Fixed ;
2231pub use sys:: FT_Glyph_BBox_Mode as BBoxMode ;
@@ -610,22 +619,20 @@ impl Drop for Face {
610619 }
611620}
612621
622+ // SAFETY: Functions that are not safe to share across threads (such as FT_Done_Face) are protected
623+ // by mutex to ensure they are only called once per thread.
624+ unsafe impl Send for Face { }
625+ // SAFETY: Functions that are not safe to share across threads (such as FT_Done_Face) are protected
626+ // by mutex to ensure they are only called once per thread.
627+ unsafe impl Sync for Face { }
628+
613629#[ cfg( test) ]
614630mod tests {
615631 use super :: * ;
616632 use std:: ffi:: CString ;
617633 use std:: fs;
618634 use std:: path:: { Path , PathBuf } ;
619635
620- /// Import things from our bridge crates to ensure that we actually link with
621- /// them.
622- mod linkage {
623- #[ allow( unused_imports) ]
624- use tectonic_bridge_flate as clippyrenamehack1;
625- #[ allow( unused_imports) ]
626- use tectonic_bridge_png as clippyrenamehack2;
627- }
628-
629636 fn assets_dir ( ) -> PathBuf {
630637 Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) )
631638 . join ( "../../tests/assets" )
0 commit comments