summaryrefslogtreecommitdiff
path: root/src/useflag/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/useflag/mod.rs')
-rw-r--r--src/useflag/mod.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/useflag/mod.rs b/src/useflag/mod.rs
index 21a746a..16104d6 100644
--- a/src/useflag/mod.rs
+++ b/src/useflag/mod.rs
@@ -4,8 +4,8 @@ use get::Get;
pub mod parsers;
-#[derive(Clone, Debug, PartialEq, Eq)]
-pub struct UseFlag(String);
+#[derive(Clone, Debug, PartialEq, Eq, Get)]
+pub struct UseFlag(#[get(method = "name")] String);
#[derive(Clone, Debug, PartialEq, Eq, Get)]
pub struct IUseFlag {
@@ -13,12 +13,6 @@ pub struct IUseFlag {
flag: UseFlag,
}
-impl UseFlag {
- pub fn get(&self) -> &str {
- self.0.as_str()
- }
-}
-
impl fmt::Display for UseFlag {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.0)