aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-08 20:35:22 +0100
committerHampusM <hampus@hampusmat.com>2023-03-08 20:35:22 +0100
commitf49d77c2961be28c3cc500af185813dd5e83a367 (patch)
tree020cb77889315fd050c099380b04cc97c3eb4843 /src/lib.rs
parent87b3898fc5d4e6ee3fed78188ea7da98c16683ab (diff)
refactor: include registry xml file with include_bytes
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 215ce03..c305ae3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,7 +33,7 @@ pub mod command;
mod xml;
#[cfg(feature = "include-xml")]
-const GL_REGISTRY_XML: &str = include_str!("../OpenGL-Registry/xml/gl.xml");
+const GL_REGISTRY_XML: &[u8] = include_bytes!("../OpenGL-Registry/xml/gl.xml");
const REGISTRY_TAG_NAME: &str = "registry";
@@ -53,7 +53,7 @@ impl Registry
#[cfg_attr(doc_cfg, doc(cfg(feature = "include-xml")))]
pub fn retrieve() -> Result<Registry, RegistryError>
{
- Self::retrieve_from_bytes(GL_REGISTRY_XML.as_bytes())
+ Self::retrieve_from_bytes(GL_REGISTRY_XML)
}
/// Retrieves the OpenGL registry from XML bytes.