Skip to content

Commit

Permalink
Add FnSelfArg::MutTakeSelf (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
NightEule5 authored Oct 30, 2023
1 parent 39db1c8 commit f89b2b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/generate/generate_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ pub enum FnSelfArg {
/// `self`. The function will consume self.
TakeSelf,

/// `mut self`. The function will consume self.
MutTakeSelf,

/// `&self`. The function will take self by reference.
RefSelf,

Expand All @@ -460,6 +463,10 @@ impl FnSelfArg {
Self::TakeSelf => {
builder.ident_str("self");
}
Self::MutTakeSelf => {
builder.ident_str("mut");
builder.ident_str("self");
}
Self::RefSelf => {
builder.punct('&');
builder.ident_str("self");
Expand Down

0 comments on commit f89b2b6

Please sign in to comment.