[librsvg: 26/33] Trivial casts in tests




commit 3814c50dc6eaa5f93d7f214cebee7f26460214be
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Oct 30 13:46:49 2020 -0600

    Trivial casts in tests

 src/attributes.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/attributes.rs b/src/attributes.rs
index 5bf4698a..20176835 100644
--- a/src/attributes.rs
+++ b/src/attributes.rs
@@ -148,20 +148,20 @@ mod tests {
         let mut v: Vec<*const libc::c_char> = Vec::new();
 
         for (localname, prefix, uri, val) in &attrs {
-            v.push(localname.as_ptr() as *const libc::c_char);
+            v.push(localname.as_ptr());
             v.push(
                 prefix
                     .as_ref()
                     .map(|p: &CString| p.as_ptr())
-                    .unwrap_or_else(|| ptr::null()) as *const libc::c_char,
+                    .unwrap_or_else(|| ptr::null()),
             );
             v.push(
                 uri.as_ref()
                     .map(|p: &CString| p.as_ptr())
-                    .unwrap_or_else(|| ptr::null()) as *const libc::c_char,
+                    .unwrap_or_else(|| ptr::null()),
             );
 
-            let val_start = val.as_ptr() as *const libc::c_char;
+            let val_start = val.as_ptr();
             let val_end = unsafe { val_start.offset(val.as_bytes().len() as isize) };
             v.push(val_start); // value_start
             v.push(val_end); // value_end


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]