1
Fork 0

Get rid of native_library projection queries

They don't seem particularly useful as I don't expect
native libraries to change frequently.
This commit is contained in:
nils 2022-10-18 16:55:32 +02:00
parent d7dd01fe8b
commit ccc54613c3
No known key found for this signature in database
7 changed files with 18 additions and 25 deletions

View file

@ -53,6 +53,17 @@ impl NativeLibKind {
NativeLibKind::RawDylib | NativeLibKind::Unspecified | NativeLibKind::LinkArg => false,
}
}
pub fn is_statically_included(&self) -> bool {
matches!(self, NativeLibKind::Static { .. })
}
pub fn is_dllimport(&self) -> bool {
matches!(
self,
NativeLibKind::Dylib { .. } | NativeLibKind::RawDylib | NativeLibKind::Unspecified
)
}
}
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable)]