Remove DynamicItems::has_required

This commit is contained in:
Dr. Chat
2021-03-29 11:17:38 -05:00
committed by Emilio Cobos Álvarez
parent 10724128df
commit 233d40890c
-7
View File
@@ -5,11 +5,6 @@ use proc_macro2::Ident;
/// Used to build the output tokens for dynamic bindings.
#[derive(Default)]
pub struct DynamicItems {
/// Tracks whether or not we contain any required symbols.
/// If so, the signature of the generated `from_library` function
/// will be altered to return a `Result<Self, ::libloading::Error>`
has_required: bool,
/// Tracks the tokens that will appears inside the library struct -- e.g.:
/// ```ignore
/// struct Lib {
@@ -136,8 +131,6 @@ impl DynamicItems {
assert_eq!(args.len(), args_identifiers.len());
}
self.has_required |= is_required;
self.struct_members.push(
if is_required {
quote! {