1- use crate :: Tag ;
21use serde:: Deserialize ;
32
3+ use crate :: Tag ;
4+
45#[ derive( Deserialize , PartialEq , Eq , Hash ) ]
5- pub struct Symbol {
6+ pub ( super ) struct Symbol {
67 /// Name of the Cargo package in which the symbol is being instantiated. Used for avoiding
78 /// symbol name collisions.
89 package : String ,
@@ -27,12 +28,12 @@ pub struct Symbol {
2728 crate_name : Option < String > ,
2829}
2930
30- pub enum SymbolTag < ' a > {
31+ pub ( super ) enum SymbolTag {
3132 /// `defmt_*` tag that we can interpret.
3233 Defmt ( Tag ) ,
3334
3435 /// Non-`defmt_*` tag for custom tooling.
35- Custom ( & ' a str ) ,
36+ Custom ( ( ) ) ,
3637}
3738
3839impl Symbol {
@@ -41,7 +42,7 @@ impl Symbol {
4142 . map_err ( |j| anyhow:: anyhow!( "failed to demangle defmt symbol `{}`: {}" , raw, j) )
4243 }
4344
44- pub fn tag ( & self ) -> SymbolTag < ' _ > {
45+ pub fn tag ( & self ) -> SymbolTag {
4546 match & * self . tag {
4647 "defmt_prim" => SymbolTag :: Defmt ( Tag :: Prim ) ,
4748 "defmt_derived" => SymbolTag :: Defmt ( Tag :: Derived ) ,
@@ -56,7 +57,7 @@ impl Symbol {
5657 "defmt_info" => SymbolTag :: Defmt ( Tag :: Info ) ,
5758 "defmt_warn" => SymbolTag :: Defmt ( Tag :: Warn ) ,
5859 "defmt_error" => SymbolTag :: Defmt ( Tag :: Error ) ,
59- _ => SymbolTag :: Custom ( & self . tag ) ,
60+ _ => SymbolTag :: Custom ( ( ) ) ,
6061 }
6162 }
6263
0 commit comments