Skip to content

Commit

Permalink
bam/examples/query: Remove PathBuf conversion of source
Browse files Browse the repository at this point in the history
  • Loading branch information
zaeleus committed Jan 7, 2024
1 parent 65411b5 commit d865698
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions noodles-bam/examples/bam_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!
//! The result matches the output of `samtools view <src> <region>`.
use std::{env, io, path::PathBuf};
use std::{env, io};

use noodles_bam as bam;
use noodles_sam::{self as sam, alignment::io::Write};
Expand All @@ -14,7 +14,7 @@ const UNMAPPED: &str = "*";
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut args = env::args();

let src = args.nth(1).map(PathBuf::from).expect("missing src");
let src = args.nth(1).expect("missing src");
let raw_region = args.next().expect("missing region");

let mut reader = bam::indexed_reader::Builder::default().build_from_path(src)?;
Expand Down

0 comments on commit d865698

Please sign in to comment.