Skip to content

Commit

Permalink
extendr-macros: minor typo correction
Browse files Browse the repository at this point in the history
  • Loading branch information
CGMossa committed Feb 28, 2024
1 parent 5cdd4c3 commit 291115d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extendr-macros/src/wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn make_function_wrappers(

let call_name = if has_self {
let is_mut = match inputs.iter().next() {
Some(FnArg::Receiver(ref reciever)) => reciever.mutability.is_some(),
Some(FnArg::Receiver(ref receiver)) => receiver.mutability.is_some(),
_ => false,
};
if is_mut {
Expand Down Expand Up @@ -317,8 +317,8 @@ pub fn translate_formal(input: &FnArg, self_ty: Option<&syn::Type>) -> FnArg {
parse_quote! { #pat : extendr_api::SEXP }
}
// &self / &mut self
FnArg::Receiver(ref reciever) => {
if !reciever.attrs.is_empty() || reciever.reference.is_none() {
FnArg::Receiver(ref receiver) => {
if !receiver.attrs.is_empty() || receiver.reference.is_none() {
quote!(compile_error!("expected &self or &mut self"));
}
if self_ty.is_none() {
Expand Down Expand Up @@ -352,8 +352,8 @@ fn translate_meta_arg(input: &mut FnArg, self_ty: Option<&syn::Type>) -> Expr {
}
}
// &self
FnArg::Receiver(ref reciever) => {
if !reciever.attrs.is_empty() || reciever.reference.is_none() {
FnArg::Receiver(ref receiver) => {
if !receiver.attrs.is_empty() || receiver.reference.is_none() {
panic!("expected &self or &mut self");
}
if self_ty.is_none() {
Expand Down

0 comments on commit 291115d

Please sign in to comment.