We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48f4734 commit 5d10d81Copy full SHA for 5d10d81
src/lib.rs
@@ -139,7 +139,12 @@ impl<R: gimli::Reader> Context<R> {
139
/// Construct a new `Context` from an existing [`gimli::Dwarf`] object.
140
#[inline]
141
pub fn from_dwarf(sections: gimli::Dwarf<R>) -> Result<Context<R>, Error> {
142
- let sections = Arc::new(sections);
+ Self::from_arc_dwarf(Arc::new(sections))
143
+ }
144
+
145
+ /// Construct a new `Context` from an existing [`gimli::Dwarf`] object.
146
+ #[inline]
147
+ pub fn from_arc_dwarf(sections: Arc<gimli::Dwarf<R>>) -> Result<Context<R>, Error> {
148
let units = ResUnits::parse(§ions)?;
149
let sup_units = if let Some(sup) = sections.sup.as_ref() {
150
SupUnits::parse(sup)?
0 commit comments