mirror of
https://github.com/openharmony/third_party_rust_bindgen.git
synced 2026-07-21 07:05:24 -04:00
Remove DynamicItems::has_required
This commit is contained in:
committed by
Emilio Cobos Álvarez
parent
10724128df
commit
233d40890c
@@ -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! {
|
||||
|
||||
Reference in New Issue
Block a user