File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
credential/cargo-credential-libsecret/src Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,11 @@ mod linux {
145
145
}
146
146
147
147
let index_url_c = CString :: new ( registry. index_url ) . unwrap ( ) ;
148
+ let mut error: * mut GError = null_mut ( ) ;
149
+ let attr_url = CString :: new ( "url" ) . unwrap ( ) ;
150
+ let schema = schema ( ) ;
148
151
match action {
149
152
cargo_credential:: Action :: Get ( _) => {
150
- let mut error: * mut GError = null_mut ( ) ;
151
- let attr_url = CString :: new ( "url" ) . unwrap ( ) ;
152
- let schema = schema ( ) ;
153
153
unsafe {
154
154
let token_c = secret_password_lookup_sync (
155
155
& schema,
@@ -187,9 +187,6 @@ mod linux {
187
187
cargo_credential:: Action :: Login ( options) => {
188
188
let label = label ( registry. name . unwrap_or ( registry. index_url ) ) ;
189
189
let token = CString :: new ( read_token ( options, registry) ?. expose ( ) ) . unwrap ( ) ;
190
- let mut error: * mut GError = null_mut ( ) ;
191
- let attr_url = CString :: new ( "url" ) . unwrap ( ) ;
192
- let schema = schema ( ) ;
193
190
unsafe {
194
191
secret_password_store_sync (
195
192
& schema,
@@ -215,9 +212,6 @@ mod linux {
215
212
Ok ( CredentialResponse :: Login )
216
213
}
217
214
cargo_credential:: Action :: Logout => {
218
- let schema = schema ( ) ;
219
- let mut error: * mut GError = null_mut ( ) ;
220
- let attr_url = CString :: new ( "url" ) . unwrap ( ) ;
221
215
unsafe {
222
216
secret_password_clear_sync (
223
217
& schema,
You can’t perform that action at this time.
0 commit comments