File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ pub fn install_version(
251
251
let target = core:: str:: from_utf8 ( & output. stdout ) ?
252
252
. lines ( )
253
253
. find ( |line| line. starts_with ( "host:" ) )
254
- . and_then ( |line| line. split ( ':' ) . last ( ) )
254
+ . and_then ( |line| line. split ( ':' ) . next_back ( ) )
255
255
. ok_or_else ( || anyhow ! ( "`host` not found from `rustc -vV` output" ) ) ?
256
256
. trim ( ) ;
257
257
let ext = if cfg ! ( target_os = "windows" ) {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use std::ops::DerefMut;
23
23
/// for example, the [`Account`](crate::accounts::account::Account). Namely,
24
24
/// one must call
25
25
/// - `load_init` after initializing an account (this will ignore the missing
26
- /// account discriminator that gets added only after the user's instruction code)
26
+ /// account discriminator that gets added only after the user's instruction code)
27
27
/// - `load` when the account is not mutable
28
28
/// - `load_mut` when the account is mutable
29
29
///
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ use std::ops::Deref;
59
59
/// The required constraints are as follows:
60
60
///
61
61
/// - `program` is the account of the program itself.
62
- /// Its constraint checks that `program_data` is the account that contains the program's upgrade authority.
63
- /// Implicitly, this checks that `program` is a BPFUpgradeable program (`program.programdata_address()?`
64
- /// will be `None` if it's not).
62
+ /// Its constraint checks that `program_data` is the account that contains the program's upgrade authority.
63
+ /// Implicitly, this checks that `program` is a BPFUpgradeable program (`program.programdata_address()?`
64
+ /// will be `None` if it's not).
65
65
/// - `program_data`'s constraint checks that its upgrade authority is the `authority` account.
66
66
/// - Finally, `authority` needs to sign the transaction.
67
67
///
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ use std::ops::Deref;
59
59
/// The required constraints are as follows:
60
60
///
61
61
/// - `program` is the account of the program itself.
62
- /// Its constraint checks that `program_data` is the account that contains the program's upgrade authority.
63
- /// Implicitly, this checks that `program` is a BPFUpgradeable program (`program.programdata_address()?`
64
- /// will be `None` if it's not).
62
+ /// Its constraint checks that `program_data` is the account that contains the program's upgrade authority.
63
+ /// Implicitly, this checks that `program` is a BPFUpgradeable program (`program.programdata_address()?`
64
+ /// will be `None` if it's not).
65
65
/// - `program_data`'s constraint checks that its upgrade authority is the `authority` account.
66
66
/// - Finally, `authority` needs to sign the transaction.
67
67
///
Original file line number Diff line number Diff line change @@ -129,7 +129,9 @@ pub fn parse_return(method: &syn::ItemFn) -> ParseResult<IxReturn> {
129
129
// Assume unit return by default
130
130
let default_generic_arg = syn:: GenericArgument :: Type ( syn:: parse_str ( "()" ) . unwrap ( ) ) ;
131
131
let generic_args = match & ty. path . segments . last ( ) . unwrap ( ) . arguments {
132
- syn:: PathArguments :: AngleBracketed ( params) => params. args . iter ( ) . last ( ) . unwrap ( ) ,
132
+ syn:: PathArguments :: AngleBracketed ( params) => {
133
+ params. args . iter ( ) . next_back ( ) . unwrap ( )
134
+ }
133
135
_ => & default_generic_arg,
134
136
} ;
135
137
let ty = match generic_args {
You can’t perform that action at this time.
0 commit comments