Commit 52a7c773 authored by Jan-Erik Rediger's avatar Jan-Erik Rediger
Browse files

Remove use of the `paste` crate

It was only used in a single place, and that can be handled by just passing the identifiers.

Closes #2473
parent 0ec6443f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
version = 4

[[package]]
name = "addr2line"
@@ -2066,7 +2066,6 @@ dependencies = [
 "async-compat",
 "bytes",
 "once_cell",
 "paste",
 "static_assertions",
]

+9 −12
Original line number Diff line number Diff line
@@ -4,11 +4,9 @@

use super::CodeType;
use crate::ComponentInterface;
use paste::paste;

macro_rules! impl_code_type_for_miscellany {
    ($T:ty, $class_name:literal, $canonical_name:literal) => {
        paste! {
    ($T:ident, $class_name:literal, $canonical_name:literal) => {
        #[derive(Debug)]
        pub struct $T;

@@ -21,7 +19,6 @@ macro_rules! impl_code_type_for_miscellany {
                $canonical_name.into()
            }
        }
        }
    };
}

+12 −15
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ use crate::{
    interface::{ComponentInterface, Radix, Type},
    Result,
};
use paste::paste;

fn render_literal(literal: &Literal, _ci: &ComponentInterface) -> Result<String> {
    fn typed_number(type_: &Type, num_str: String) -> Result<String> {
@@ -57,8 +56,7 @@ fn render_literal(literal: &Literal, _ci: &ComponentInterface) -> Result<String>
}

macro_rules! impl_code_type_for_primitive {
    ($T:ty, $class_name:literal) => {
        paste! {
    ($T:ident, $class_name:literal) => {
        #[derive(Debug)]
        pub struct $T;

@@ -75,7 +73,6 @@ macro_rules! impl_code_type_for_primitive {
                render_literal(&literal, ci)
            }
        }
        }
    };
}

+9 −13
Original line number Diff line number Diff line
@@ -4,11 +4,8 @@

use super::CodeType;

use paste::paste;

macro_rules! impl_code_type_for_miscellany {
    ($T:ty, $canonical_name:literal) => {
        paste! {
    ($T:ident, $canonical_name:literal) => {
        #[derive(Debug)]
        pub struct $T;

@@ -21,7 +18,6 @@ macro_rules! impl_code_type_for_miscellany {
                format!("{}", $canonical_name)
            }
        }
        }
    };
}

+12 −15
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

use super::CodeType;
use crate::{backend::Literal, bail, interface::Radix, Result};
use paste::paste;

fn render_literal(literal: &Literal) -> Result<String> {
    Ok(match literal {
@@ -34,8 +33,7 @@ fn render_literal(literal: &Literal) -> Result<String> {
}

macro_rules! impl_code_type_for_primitive {
    ($T:ty, $python_name:literal, $canonical_name:literal) => {
        paste! {
    ($T:ident, $python_name:literal, $canonical_name:literal) => {
        #[derive(Debug)]
        pub struct $T;
        impl CodeType for $T {
@@ -51,7 +49,6 @@ macro_rules! impl_code_type_for_primitive {
                render_literal(&literal)
            }
        }
        }
    };
}

Loading