summaryrefslogtreecommitdiff
path: root/rust/src/section.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-04-17 12:35:04 -0300
committerKyle Martin <krm504@nyu.edu>2024-05-09 14:00:01 -0400
commitc528f3ad0e1abd4168b1507e8c30bc14c4a6a736 (patch)
tree83d13b9b64be9383929e755efa97fd4877b5f2ec /rust/src/section.rs
parent71a1c7e162046a44e7640e468b69a2b59599b198 (diff)
fix rust doc code
Diffstat (limited to 'rust/src/section.rs')
-rw-r--r--rust/src/section.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/rust/src/section.rs b/rust/src/section.rs
index 06d09fca..580d5a21 100644
--- a/rust/src/section.rs
+++ b/rust/src/section.rs
@@ -72,8 +72,11 @@ impl Section {
/// You need to create a section builder, customize that section, then add it to a binary view:
///
- /// ```
- /// bv.add_section(Section::new().align(4).entry_size(4))
+ /// ```no_run
+ /// # use binaryninja::section::Section;
+ /// # use binaryninja::binaryview::BinaryViewExt;
+ /// let bv = binaryninja::load("example").unwrap();
+ /// bv.add_section(Section::builder("example", 0..1024).align(4).entry_size(4))
/// ```
pub fn builder<S: BnStrCompatible>(name: S, range: Range<u64>) -> SectionBuilder<S> {
SectionBuilder::new(name, range)