Skip to content

Commit ed85b79

Browse files
cargo-credential-libsecret: c""-style literals
1 parent 688d590 commit ed85b79

File tree

1 file changed

+4
-4
lines changed
  • credential/cargo-credential-libsecret/src

1 file changed

+4
-4
lines changed

credential/cargo-credential-libsecret/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ mod linux {
111111
attr_type: SecretSchemaAttributeType::String,
112112
}; 32];
113113
attributes[0] = SecretSchemaAttribute {
114-
name: b"url\0".as_ptr() as *const gchar,
114+
name: c"url".as_ptr() as *const gchar,
115115
attr_type: SecretSchemaAttributeType::String,
116116
};
117117
SecretSchema {
118-
name: b"org.rust-lang.cargo.registry\0".as_ptr() as *const gchar,
118+
name: c"org.rust-lang.cargo.registry".as_ptr() as *const gchar,
119119
flags: SecretSchemaFlags::None,
120120
attributes,
121121
reserved: 0,
@@ -168,7 +168,7 @@ mod linux {
168168

169169
let index_url_c = CString::new(registry.index_url).unwrap();
170170
let mut error: *mut GError = null_mut();
171-
let attr_url = b"url\0".as_ptr() as *const gchar;
171+
let attr_url = c"url".as_ptr() as *const gchar;
172172
let schema = schema();
173173
match action {
174174
cargo_credential::Action::Get(_) => unsafe {
@@ -210,7 +210,7 @@ mod linux {
210210
unsafe {
211211
secret_password_store_sync(
212212
&schema,
213-
b"default\0".as_ptr() as *const gchar,
213+
c"default".as_ptr() as *const gchar,
214214
label.as_ptr(),
215215
token.as_ptr(),
216216
null_mut(),

0 commit comments

Comments
 (0)