<commit_before>#[macro_export]
macro_rules! object_struct {
    ($name:ident) => (
        object_struct!($name,);
    );
    ($name:ident<$($t:ident),+>) => (
        object_struct!($name, $($t),+);
    );
    ($name:ident, $($t:ident),*) => (
        pub enum $name<$($t),*> { }

        object_impl!($name $(,$t)*);

        impl<$($t),*> $crate::INSObject for $name<$($t),*> {
            fn class() -> &'static ::objc::runtime::Class {
                let name = stringify!($name);
                match ::objc::runtime::Class::get(name) {
                    Some(cls) => cls,
                    None => panic!("Class {} not found", name),
                }
            }
        }

        impl<$($t),*> ::std::cmp::PartialEq for $name<$($t),*> {
            fn eq(&self, other: &$name<$($t),*>) -> bool {
                use $crate::INSObject;
                self.is_equal(other)
            }
        }

        impl<$($t),*> ::std::cmp::Eq for $name<$($t),*> { }

        impl<$($t),*> ::std::hash::Hash for $name<$($t),*> {
            fn hash<H>(&self, state: &mut H) where H: ::std::hash::Hasher {
                use $crate::INSObject;
                self.hash_code().hash(state);
            }
        }

        impl<$($t),*> ::std::fmt::Debug for $name<$($t),*> {
            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                use $crate::{INSObject, INSString};
                ::std::fmt::Debug::fmt(self.description().as_str(), f)
            }
        }
    );
}

#[macro_export]
macro_rules! object_impl {
    ($name:ident) => (
        object_impl!($name,);
    );
    ($name:ident<$($t:ident),+>) => (
        object_impl!($name, $($t),+);
    );
    ($name:ident, $($t:ident),*) => (
        unsafe impl<$($t),*> ::objc::Message for $name<$($t),*> { }

        impl<'a $(, $t)*> ::objc::Encode for &'a $name<$($t),*> {
            fn code() -> &'static str { "@" }
        }

        impl<'a $(, $t)*> ::objc::Encode for &'a mut $name<$($t),*> {
            fn code() -> &'static str { "@" }
        }

        impl<'a $(, $t)*> ::objc::Encode for Option<&'a $name<$($t),*>> {
            fn code() -> &'static str { "@" }
        }

        impl<'a $(, $t)*> ::objc::Encode for Option<&'a mut $name<$($t),*>> {
            fn code() -> &'static str { "@" }
        }

        impl<$($t),*> ::objc::Encode for *const $name<$($t),*> {
            fn code() -> &'static str { "@" }
        }

        impl<$($t),*> ::objc::Encode for *mut $name<$($t),*> {
            fn code() -> &'static str { "@" }
        }<commit_msg>Removed Encode impl for NSObjects.<commit_after>#[macro_export]
macro_rules! object_struct {
    ($name:ident) => (
        object_struct!($name,);
    );
    ($name:ident<$($t:ident),+>) => (
        object_struct!($name, $($t),+);
    );
    ($name:ident, $($t:ident),*) => (
        pub enum $name<$($t),*> { }

        object_impl!($name $(,$t)*);

        impl<$($t),*> $crate::INSObject for $name<$($t),*> {
            fn class() -> &'static ::objc::runtime::Class {
                let name = stringify!($name);
                match ::objc::runtime::Class::get(name) {
                    Some(cls) => cls,
                    None => panic!("Class {} not found", name),
                }
            }
        }

        impl<$($t),*> ::std::cmp::PartialEq for $name<$($t),*> {
            fn eq(&self, other: &$name<$($t),*>) -> bool {
                use $crate::INSObject;
                self.is_equal(other)
            }
        }

        impl<$($t),*> ::std::cmp::Eq for $name<$($t),*> { }

        impl<$($t),*> ::std::hash::Hash for $name<$($t),*> {
            fn hash<H>(&self, state: &mut H) where H: ::std::hash::Hasher {
                use $crate::INSObject;
                self.hash_code().hash(state);
            }
        }

        impl<$($t),*> ::std::fmt::Debug for $name<$($t),*> {
            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                use $crate::{INSObject, INSString};
                ::std::fmt::Debug::fmt(self.description().as_str(), f)
            }
        }
    );
}

#[macro_export]
macro_rules! object_impl {
    ($name:ident) => (
        object_impl!($name,);
    );
    ($name:ident<$($t:ident),+>) => (
        object_impl!($name, $($t),+);
    );
    ($name:ident, $($t:ident),*) => (
        unsafe impl<$($t),*> ::objc::Message for $name<$($t),*> { }
{'fraction_non_alphanumeric': 0.2540076766764507, 'fraction_numerical': 0.0, 'mean_word_length': 1.92989417989418, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3352517', 'n_tokens_mistral': 1554, 'n_tokens_neox': 1522, 'n_words': 256}