@@ -41,7 +41,7 @@ enum ProgressState {
41
41
/// * `username_from_url` - the username that was embedded in the url, or `None`
42
42
/// if it was not included.
43
43
/// * `allowed_types` - a bitmask stating which cred types are ok to return.
44
- pub type Credentials < ' a > = FnMut ( & str , Option < & str > , CredentialType )
44
+ pub type Credentials < ' a > = dyn FnMut ( & str , Option < & str > , CredentialType )
45
45
-> Result < Cred , Error > + ' a ;
46
46
47
47
/// Callback to be invoked while a transfer is in progress.
@@ -51,15 +51,15 @@ pub type Credentials<'a> = FnMut(&str, Option<&str>, CredentialType)
51
51
/// continue. A return value of `false` will cancel the transfer.
52
52
///
53
53
/// * `progress` - the progress being made so far.
54
- pub type TransferProgress < ' a > = FnMut ( Progress ) -> bool + ' a ;
54
+ pub type TransferProgress < ' a > = dyn FnMut ( Progress ) -> bool + ' a ;
55
55
56
56
/// Callback for receiving messages delivered by the transport.
57
57
///
58
58
/// The return value indicates whether the network operation should continue.
59
- pub type TransportMessage < ' a > = FnMut ( & [ u8 ] ) -> bool + ' a ;
59
+ pub type TransportMessage < ' a > = dyn FnMut ( & [ u8 ] ) -> bool + ' a ;
60
60
61
61
/// Callback for whenever a reference is updated locally.
62
- pub type UpdateTips < ' a > = FnMut ( & str , Oid , Oid ) -> bool + ' a ;
62
+ pub type UpdateTips < ' a > = dyn FnMut ( & str , Oid , Oid ) -> bool + ' a ;
63
63
64
64
/// Callback for a custom certificate check.
65
65
///
@@ -68,14 +68,14 @@ pub type UpdateTips<'a> = FnMut(&str, Oid, Oid) -> bool + 'a;
68
68
///
69
69
/// The second argument is the hostname for the connection is passed as the last
70
70
/// argument.
71
- pub type CertificateCheck < ' a > = FnMut ( & Cert , & str ) -> bool + ' a ;
71
+ pub type CertificateCheck < ' a > = dyn FnMut ( & Cert , & str ) -> bool + ' a ;
72
72
73
73
/// Callback for each updated reference on push.
74
74
///
75
75
/// The first argument here is the `refname` of the reference, and the second is
76
76
/// the status message sent by a server. If the status is `Some` then the update
77
77
/// was rejected by the remote server with a reason why.
78
- pub type PushUpdateReference < ' a > = FnMut ( & str , Option < & str > ) -> Result < ( ) , Error > + ' a ;
78
+ pub type PushUpdateReference < ' a > = dyn FnMut ( & str , Option < & str > ) -> Result < ( ) , Error > + ' a ;
79
79
80
80
impl < ' a > Default for RemoteCallbacks < ' a > {
81
81
fn default ( ) -> Self {
0 commit comments