We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c61866 + 83ce275 commit 0e966bdCopy full SHA for 0e966bd
src/interactions.rs
@@ -157,8 +157,8 @@ where
157
let all = self.get_current_markdown()?;
158
let start = self.data_section_start();
159
let end = self.data_section_end();
160
- let start_idx = all.find(&start).unwrap();
161
- let end_idx = all.find(&end).unwrap();
+ let start_idx = all.find(&start)?;
+ let end_idx = all.find(&end)?;
162
let text = &all[(start_idx + start.len())..end_idx];
163
Some(serde_json::from_str(text).unwrap_or_else(|e| {
164
panic!("deserializing data {:?} failed: {:?}", text, e);
0 commit comments