File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
32
32
// /
33
33
// / credentialBlock - a block that will be called when credentials are requested.
34
34
// / Must not be nil.
35
- + (instancetype )providerWithBlock : (GTCredential *(^)(GTCredentialType type, NSString *URL, NSString *userName))credentialBlock ;
35
+ + (instancetype )providerWithBlock : (GTCredential * _Nullable (^)(GTCredentialType type, NSString *URL, NSString *userName))credentialBlock;
36
36
37
37
// / Default credential provider method.
38
38
// /
@@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
46
46
// / type - the credential types allowed by the operation.
47
47
// / URL - the URL the operation is authenticating against.
48
48
// / userName - the user name provided by the operation. Can be nil, and might be ignored.
49
- - (GTCredential *)credentialForType : (GTCredentialType)type URL : (NSString *)URL userName : (nullable NSString *)userName ;
49
+ - (GTCredential * _Nullable )credentialForType : (GTCredentialType)type URL : (NSString *)URL userName : (nullable NSString *)userName ;
50
50
@end
51
51
52
52
// / The GTCredential class is used to provide authentication data.
Original file line number Diff line number Diff line change 12
12
13
13
#import " git2/errors.h"
14
14
15
- typedef GTCredential *(^GTCredentialProviderBlock)(GTCredentialType allowedTypes, NSString *URL, NSString *userName);
15
+ typedef GTCredential * _Nullable (^GTCredentialProviderBlock)(GTCredentialType allowedTypes, NSString *URL, NSString *userName);
16
16
17
17
@interface GTCredentialProvider ()
18
18
@property (nonatomic , readonly , copy ) GTCredentialProviderBlock credBlock;
@@ -30,7 +30,7 @@ + (instancetype)providerWithBlock:(GTCredentialProviderBlock)credentialBlock {
30
30
return provider;
31
31
}
32
32
33
- - (GTCredential *)credentialForType : (GTCredentialType)type URL : (NSString *)URL userName : (NSString *)userName {
33
+ - (GTCredential * _Nullable )credentialForType : (GTCredentialType)type URL : (NSString *)URL userName : (NSString *)userName {
34
34
NSAssert (self.credBlock != nil , @" Provider asked for credentials without block being set." );
35
35
36
36
return self.credBlock (type, URL, userName);
You can’t perform that action at this time.
0 commit comments