From f49d77c2961be28c3cc500af185813dd5e83a367 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 8 Mar 2023 20:35:22 +0100 Subject: refactor: include registry xml file with include_bytes --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') 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 { - Self::retrieve_from_bytes(GL_REGISTRY_XML.as_bytes()) + Self::retrieve_from_bytes(GL_REGISTRY_XML) } /// Retrieves the OpenGL registry from XML bytes. -- cgit v1.2.3-18-g5258