macros: remove embassy_prefix attr.

This was used in the past for reexporting the macros from drogue-device,
which is no longer using it.

Also, it is a pain to support, so we don't want it.
This commit is contained in:
Dario Nieuwenhuis
2022-08-17 15:03:12 +02:00
parent ef9e373ec4
commit bd0aaec624
4 changed files with 26 additions and 83 deletions

View File

@ -1,2 +1 @@
pub mod ctxt;
pub mod path;

View File

@ -1,41 +0,0 @@
use darling::{FromMeta, Result};
use proc_macro2::Span;
use syn::{LitStr, Path};
#[derive(Debug)]
pub struct ModulePrefix {
literal: LitStr,
}
impl ModulePrefix {
pub fn new(path: &str) -> Self {
let literal = LitStr::new(path, Span::call_site());
Self { literal }
}
pub fn append(&self, component: &str) -> ModulePrefix {
let mut lit = self.literal().value();
lit.push_str(component);
Self::new(lit.as_str())
}
pub fn path(&self) -> Path {
self.literal.parse().unwrap()
}
pub fn literal(&self) -> &LitStr {
&self.literal
}
}
impl FromMeta for ModulePrefix {
fn from_string(value: &str) -> Result<Self> {
Ok(ModulePrefix::new(value))
}
}
impl Default for ModulePrefix {
fn default() -> ModulePrefix {
ModulePrefix::new("::")
}
}