Properly cfg gate std and non-std

pull/968/head
martinsoees 7 months ago
parent b05ab1599d
commit d9cd8de7fc

@ -39,9 +39,11 @@
//! // Relocate the programs //! // Relocate the programs
//! #[cfg(feature = "std")] //! #[cfg(feature = "std")]
//! let text_sections = std::collections::HashSet::new(); //! let text_sections = std::collections::HashSet::new();
//! let ignore_maps: std::collections::HashMap<String, Map> = std::collections::HashMap::new(); //! #[cfg(feature = "std")]
//! let ignore_maps = std::collections::HashMap::new();
//! #[cfg(not(feature = "std"))] //! #[cfg(not(feature = "std"))]
//! let text_sections = hashbrown::HashSet::new(); //! let text_sections = hashbrown::HashSet::new();
//! #[cfg(not(feature = "std"))]
//! let ignore_maps = hashbrown::HashMap::new(); //! let ignore_maps = hashbrown::HashMap::new();
//! object.relocate_calls(&text_sections).unwrap(); //! object.relocate_calls(&text_sections).unwrap();
//! object.relocate_maps(std::iter::empty(), &text_sections, &ignore_maps).unwrap(); //! object.relocate_maps(std::iter::empty(), &text_sections, &ignore_maps).unwrap();

Loading…
Cancel
Save