]> git.proxmox.com Git - proxmox.git/commitdiff
api-macro: fixup idents in SimpleIdent
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 3 Dec 2019 10:56:27 +0000 (11:56 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 3 Dec 2019 10:56:27 +0000 (11:56 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-api-macro/src/util.rs

index 5a927d2c621addbb2277a0fdcbb0dc11da78e08a..1e32844cb9a1ab6ecca112c241cf29e430d4d872 100644 (file)
@@ -22,7 +22,7 @@ pub struct SimpleIdent(Ident, String);
 
 impl SimpleIdent {
     pub fn new(name: String, span: Span) -> Self {
-        Self(Ident::new(&name, span), name)
+        Self(Ident::new(&name.replace("-", "_"), span), name)
     }
 
     #[inline]