Skip to content

Commit 64dddd5

Browse files
committed
fix bug in doctest
1 parent 19cd180 commit 64dddd5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

microBioRust/src/blast.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
//! Several different output formats can be specified, here we provide parsers for two common output formats:
2525
//! The BLAST+ outfmt 5 (an XML verbose format) and the outfmt 6 (the single line tabular format)
2626
//!
27-
//!```
27+
//!
2828
//! Example to save a provided BLAST outfmt 6 single line tabular format into json
2929
//!
30-
//! ```rust
30+
//!```rust
3131
//! use std::io::Write;
3232
//! use tokio::io::BufReader as TokioBufReader;
33+
//! use std::io::Cursor;
34+
//! use microBioRust::blast::stream_outfmt6_to_json;
3335
//!
3436
//! async fn test_stream_tab_to_json() {
3537
//! let data = "q1 h1 99.0 10 0 0 1 10 1 10 1e-5 50";
@@ -38,12 +40,14 @@
3840
//! let res = stream_outfmt6_to_json(reader).await;
3941
//! println!("results are {:?}", &res);
4042
//! }
41-
//!
43+
//!```
4244
//! Example to create a completely new blast XML record
4345
//!
4446
//!```rust
4547
//! use std::io::Write;
4648
//! use tokio::io::BufReader as TokioBufReader;
49+
//! use std::io::Cursor;
50+
//! use microBioRust::blast::AsyncBlastXmlIter;
4751
//!
4852
//! async fn test_async_xml_iter_simple() {
4953
//! let xml = r#"<?xml version="1.0"?>
@@ -84,10 +88,7 @@
8488
//! assert_eq!(it.query_def.unwrap(), "My query");
8589
//! assert_eq!(it.hits.len(), 1);
8690
//! }
87-
//!}
88-
//!
8991
//!
90-
//! ```rust
9192
//!```
9293
9394
use anyhow::{Context, Result};

0 commit comments

Comments
 (0)