diff src/conv.rs @ 12:30831c70e5c0

Remove PhantomData usage. PhantomData is used through the library to substitute associated constants (to types). However, calling `PamItem::item_type(PhantomData<T>)` can easily be substituted by calling `T::item_type()`, getting rid of the need for PhantomData.
author Marc Brinkmann <git@marcbrinkmann.de>
date Sun, 26 Feb 2017 12:12:36 +0100
parents a83c56216e21
children 51b097c12d3c
line wrap: on
line diff
--- a/src/conv.rs	Sun Feb 26 12:08:11 2017 +0100
+++ b/src/conv.rs	Sun Feb 26 12:12:36 2017 +0100
@@ -1,7 +1,6 @@
 use libc::{c_char, c_int};
 use std::ptr;
 use std::ffi::{CStr, CString};
-use std::marker::PhantomData;
 
 use constants;
 use constants::*;
@@ -76,7 +75,7 @@
 }
 
 impl PamItem for PamConv {
-    fn item_type(_: PhantomData<Self>) -> PamItemType {
+    fn item_type() -> PamItemType {
         PAM_CONV
     }
 }