mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 18:20:51 +00:00
Fix mistakes/nits.
This commit is contained in:
parent
ba67089501
commit
66bc98cc4b
@ -36,16 +36,20 @@ pub struct Export {
|
||||
pub constructor: Option<String>,
|
||||
/// The rust function
|
||||
pub function: Function,
|
||||
///
|
||||
/// Comments extracted from the rust source.
|
||||
pub comments: Vec<String>,
|
||||
/// The name of the rust object the function belongs to TODO is this correct?
|
||||
/// The name of the rust function/method on the rust side.
|
||||
pub rust_name: Ident,
|
||||
}
|
||||
|
||||
/// The 3 types variations of `self`.
|
||||
#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))]
|
||||
pub enum MethodSelf {
|
||||
/// `self`
|
||||
ByValue,
|
||||
/// `&mut self`
|
||||
RefMutable,
|
||||
/// `&self`
|
||||
RefShared,
|
||||
}
|
||||
|
||||
@ -251,7 +255,9 @@ impl Export {
|
||||
Ident::new(&generated_name, Span::call_site())
|
||||
}
|
||||
|
||||
/// ???
|
||||
/// This is the name of the shim function that gets exported and takes the raw
|
||||
/// ABI form of its arguments and converts them back into their normal,
|
||||
/// "high level" form before calling the actual function.
|
||||
pub(crate) fn export_name(&self) -> String {
|
||||
let fn_name = self.function.name.to_string();
|
||||
match &self.class {
|
||||
@ -277,7 +283,6 @@ impl Export {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl Enum {
|
||||
fn shared(&self) -> shared::Enum {
|
||||
shared::Enum {
|
||||
|
@ -48,7 +48,7 @@ impl BindgenAttrs {
|
||||
.next()
|
||||
}
|
||||
|
||||
/// Get the first module attribute
|
||||
/// Get the first version attribute
|
||||
fn version(&self) -> Option<&str> {
|
||||
self.attrs
|
||||
.iter()
|
||||
|
Loading…
x
Reference in New Issue
Block a user