Auto merge of #353 - linkmauve:no-foreign-types, r=pcwalton

Only use foreign-types on macOS in the C API

Its only use is for `CoreAnimationLayerRef::from_ptr()` in `PFMetalDeviceCreate`, so this fixes a warning on other platforms.

The last time I tried to fix this warning I didn’t notice that it was actually used, and thus 2d2bc14e5c broke the macOS build in #257.
This commit is contained in:
bors-servo 2020-06-16 11:54:58 -04:00 committed by GitHub
commit 22d5dbc26a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,6 @@
//! C bindings to Pathfinder.
use font_kit::handle::Handle;
use foreign_types::ForeignTypeRef;
use gl;
use pathfinder_canvas::{Canvas, CanvasFontContext, CanvasRenderingContext2D, FillStyle, LineJoin};
use pathfinder_canvas::{Path2D, TextAlign, TextMetrics};
@ -42,6 +41,8 @@ use std::str;
use metal::{CAMetalLayer, CoreAnimationLayerRef, Device};
#[cfg(all(target_os = "macos", not(feature = "pf-gl")))]
use pathfinder_metal::MetalDevice;
#[cfg(all(target_os = "macos", not(feature = "pf-gl")))]
use foreign_types::ForeignTypeRef;
// Constants